<asp:Panel AccessKey="string" BackColor="color name|#dddddd" BackImageUrl="uri" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset" BorderWidth="size" CssClass="string" DefaultButton="string" Direction="NotSet|LeftToRight|RightToLeft" Enabled="True|False" EnableTheming="True|False" EnableViewState="True|False" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" GroupingText="string" Height="size" HorizontalAlign="NotSet|Left|Center|Right|Justify" ID="string" 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" ScrollBars="None|Horizontal|Vertical|Both|Auto" SkinID="string" Style="string" TabIndex="integer" ToolTip="string" Visible="True|False" Width="size" Wrap="True|False" > </asp:Panel>
<%@ Page Language="C#" Debug="true" %> <script runat="server"> void Button1_Click(object sender, EventArgs e) { this.Panel1.Visible = false; this.Panel2.Visible = true; } void Button2_Click(object sender, EventArgs e) { this.Panel1.Visible = true; this.Panel2.Visible = false; } </script> <html> <head> </head> <body> <form runat="server"> <p> <asp:Panel id="Panel1" runat="server"> <asp:Label id="Label1" runat="server" text="Labe1"></asp:Label> <asp:Label id="Label2" runat="server" text="Labe2"></asp:Label> <asp:Label id="Label3" runat="server" text="Labe3"></asp:Label> <asp:Label id="Label4" runat="server" text="Labe4"></asp:Label> </asp:Panel> <br /> <asp:Panel id="Panel2" runat="server"> <asp:Label id="Label5" runat="server" text="Labe5"></asp:Label> <asp:Label id="Label6" runat="server" text="Labe6"></asp:Label> <asp:Label id="Label7" runat="server" text="Labe7"></asp:Label> <asp:Label id="Label8" runat="server" text="Labe8"></asp:Label> </asp:Panel> </p> <p> <asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"></asp:Button> <asp:Button id="Button2" onclick="Button2_Click" runat="server" Text="Button"></asp:Button> </p> </form> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท