My Profile

Thursday, February 10, 2011

How to use MultiView Control?




We’ll see how to use this control in a step wise manner.

Step 1: In a form place common (common to all the views) content like image and LinkButtons on the top of the form.

Step 2: Create “MultiView” Control and place required views inside it using “View” control. Design View content according to the requirement.

Step 3: MultiView control has “ActiveViewIndex” property, which is used to specify the view to be displayed. Its default value is “-1”. 

Step 4: In created LinkButtons write code to display the required view like:
                   MultiView1.ActiveViewIndex = 1;

Example: with this example we can get clear idea about how to use MultiView.

Step 1: design the form as following.




Step 2: Coding

Under User Info [LinkButton] click Event:
    MultiView1.ActiveViewIndex = 0;

Under Images [LinkButton] click Event:
    MultiView1.ActiveViewIndex = 1;

Under Contact Us [LinkButton] click Event:
    MultiView1.ActiveViewIndex = 2;

That’s it... You’re done!!

---------------------------------------------------------- 
** If you like this post please like our page in 
facebook " Dot Net Support" .

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More