ASP.NET Syntax ASP.NET Syntax for Web Controls
Represents a control that acts as a container for a group of controls within a MultiView control.
Declarative Syntax
<asp:View
EnableTheming = "True | False"
EnableViewState = "True | False"
ID = "string"
OnActivate = "Activate event handler"
OnDataBinding = "DataBinding event handler"
OnDeactivate = "Deactivate event handler"
OnDisposed = "Disposed event handler"
OnInit = "Init event handler"
OnLoad = "Load event handler"
OnPreRender = "PreRender event handler"
OnUnload = "Unload event handler"
runat = "server"
SkinID = "string"
Visible = "True | False"
/>
For information on the individual members of this class, see View in the class library.
The View control is a container for a group of controls. A View control must always be contained within a MultiView control. Only one View control at a time can be defined as the active view within a MultiView control.
The following example demonstrates how to use a MultiView control to create a basic survey, using a View control for each of the survey questions.
When the user clicks the Previous button on any page, the ActiveViewIndex property is decremented to navigate to the previous View control. When the user clicks the Next button on any page, the ActiveViewIndex property is incremented to navigate to the next View control.
<asp:multiview id="devPoll"
activeviewindex=0
runat="Server">
<asp:view id="Page1" runat="Server">
<p><asp:label id="Page1Label"
font-bold = "true"
text = "What kind of applications do you develop?"
runat="Server" />
</p>
... other control definitions for view here ...
</asp:view>
...
<asp:view id="Page4" runat="Server">
<p><asp:label id="Label1"
font-bold = "true"
text = "Thank you for taking the survey."
runat="Server" />
</p>
... other control definitions for view here ...
</asp:view>
</asp:multiview>
Show me
View Class MiltiView and View Web Server Controls