<asp:HiddenField EnableTheming="True|False" EnableViewState="True|False" 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" OnValueChanged="ValueChanged event handler" runat="server" SkinID="string" Value="string" Visible="True|False" > </asp:HiddenField>
<%@ Page Language="C#" Debug="true" %> <script runat="server"> void Page_Load(object sender, EventArgs e) { this.HiddenField1.Value = "www.ThaiCreate.Com"; } void Button1_Click(object sender, EventArgs e) { this.lblText.Text = this.HiddenField1.Value; } </script> <html> <head> </head> <body> <form runat="server"> <asp:HiddenField id="HiddenField1" runat="Server"></asp:HiddenField> <asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"></asp:Button> <br> <hr> <asp:Label id="lblText" runat="server"></asp:Label> </form> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท