ASP.NET(vb.net) & View - asp:View - asp:View : The MultiView control represents a control that acts as a container for groups of View controls. It allows you to define a group of View controls, where each View control contains child controls, for example, in an online survey application. Your application can then render a specific View control to the client based on criteria such as user identity, user preferences, or information passed in a query string parameter.
ShotDev Focus:
- ASP.NET(vb.net) & View - asp:View
Example
View.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub DropDownList1_SelectedIndexChanged(sender As Object, e As System.EventArgs) MultiView1.ActiveViewIndex = DropDownList1.SelectedValue End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form id="form1" runat="server"> <asp:DropDownList ID="DropDownList1" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" runat="server" AutoPostBack="True"> <asp:ListItem Value="0">Name</asp:ListItem> <asp:ListItem Value="1">Email</asp:ListItem> <asp:ListItem Value="2">Password</asp:ListItem> </asp:DropDownList> <br /> <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0"> <asp:View ID="View1" runat="server"> First Name :<br /> <asp:TextBox ID="txtFirstName" runat="server" Width="184px"></asp:TextBox> <br /> Last Name :<br /> <asp:TextBox ID="txtLastName" runat="server" Width="184px"></asp:TextBox> </asp:View> <asp:View ID="View2" runat="server"> Enter Your Email<br /> <asp:TextBox ID="txtEmail" runat="server" Width="184px"></asp:TextBox> </asp:View> <asp:View ID="View3" runat="server"> (Auth Password) Password:<br /> <asp:TextBox ID="txtPassword1" runat="server" TextMode="Password" Width="192px"></asp:TextBox><br /> <asp:TextBox ID="txtPassword2" runat="server" TextMode="Password" Width="192px"></asp:TextBox> </asp:View> </asp:MultiView> <asp:Label id="lblText1" runat="server"></asp:Label> </form> </body> </html>
Screenshot