<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:View>
<%@ Page Language="C#" %> <script runat="server"> void DropDownList1_SelectedIndexChanged(Object sender,System.EventArgs e) { MultiView1.ActiveViewIndex = Convert.ToInt32(DropDownList1.SelectedItem.Value); } </script> <html> <head> <title>ThaiCreate.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>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท