• Now Online : 31
  • admin@codemyne.net


A group of View controls combinedly forms a MultiView Control. Each View control contains child controls. So, an application can then render a specific View control to the client based on criteria such as user identity, user preferences, and information passed in a query-string parameter.

MultiView control is also used to create wizards.

Only one View control at a time can be defined as the active view within a MultiView control. When a View control is defined as the active view, the child controls that it contains are rendered to the client.

ActiveViewIndex property

The ActiveViewIndex property or the SetActiveView method are used to define the active view.

Setting the ActiveViewIndex property programmatically, or calling the SetActiveView method, allows the application to determine which View control to render to the client at run time based on criteria such as a user's identity or preferences.

Activate event

Activate event is raised when the current View control becomes the active view. This occurs when the value of the ActiveViewIndex property changes or the SetActiveView method is called to specify a different View control. For example, if View1 is the active view within a MultiView control, when the ActiveViewIndex property changes to specify View2, the Activate event is raised for View2 and the Deactivate event is raised for View1.

Creating a multiview is straightforward. Add the MultiView tag to your .aspx pagefile and then add View tag inside it foreach seperate view as shown below.

 <asp:MultiView ID="MultiView1" runat="server">
      <asp:View ID="View1" runat="server"></asp:View>
      <asp:View ID="View2" runat="server"></asp:View>
      <asp:View ID="View3" runat="server"></asp:View>
      <asp:View ID="View4" runat="server"></asp:View>
Inside the tag add the HTML and web controls for that view.

Note: Multiview is not provided with any default user interface-it renders only whatever HTML and controls you add.

You can see the functionality from here. And can also download complete sample code.

Comments/Suggestions are invited. Happy coding......!

Comments Post a Comment

wamiq 3/16/2012 (IST) / Reply

i need this code

Rosy 3/28/2012 (IST) / Reply

too short note :(

sadasivareddy 8/14/2012 (IST) / Reply

hi this is sada

dev 8/25/2012 (IST) / Reply

cant understand properly. very short notes

mk 2/22/2013 (IST) / Reply

i need this code

Rachana 9/3/2013 (IST) / Reply

It is use ful bt cant download i registered in it thn also