asp.net.ph

Skip Navigation Links

View Control Syntax

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

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

Remarks

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.

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 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 

See Also

View Class   MiltiView and View Web Server Controls



© 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