ASP.NET Syntax ASP.NET Syntax for Web Controls
Creates a control that acts as a container for a group of View controls.
Declarative Syntax
<asp:MultiView
ActiveViewIndex = integer
EnableTheming = "True | False"
EnableViewState = "True | False"
ID = "string"
OnActiveViewChanged = "ActiveViewChanged event handler"
OnDataBinding = "DataBinding 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"
>
<asp:TemplatedWizardStep
AllowReturn = "True | False"
ContentTemplateContainer = "string"
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"
StepType = "Auto | Complete | Finish | Start | Step"
Title = "string"
Visible = "True | False"
>
<ContentTemplate>
<!-- child controls -->
</ContentTemplate>
<CustomNavigationTemplate>
<!-- child controls -->
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
<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"
/>
<asp:WizardStep
AllowReturn = "True | False"
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"
StepType = "Auto | Complete | Finish | Start | Step"
Title = "string"
Visible = "True | False"
/>
</asp:MultiView>
For information on the individual members of this class, see MultiView in the class library.
The MultiView control is a container for a group of View controls.
This control allows authors to define a group of View controls, which in turn contain child controls. An application can then render a specific View control to the client based on criteria such as user identity, user preferences, and information that is passed, say, in a query-string parameter.
The MultiView control may also be used to create wizards. In this scenario, each View control that is contained in a MultiView control represents a different step or page in the wizard.
And since MultiView provides the same functionality as the ASP.NET mobile Form control in Microsoft .NET Framework version 1.1, this control can also be used to develop multiple-screen applications for mobile devices.
The following example demonstrates how to use a MultiView control to create a basic survey, using a View control for each of the survey question.
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
MultiView Class MultiView Web Server Control