asp.net.ph

Skip Navigation Links

MultiView Control Syntax

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

For information on the individual members of this class, see MultiView in the class library.

Remarks

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.

Syntax Example

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 

See Also

MultiView Class   MultiView Web Server Control



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note