HiddenField Web Server Control Declarative Syntax
Creates a hidden field that is used to store a non-displayed value.
<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"
/>
Remarks
The HiddenField control is used to store a value that needs to be persisted across posts to the server. It is rendered as an <input type= "hidden"/> element.
For more information about the HiddenField control, see HiddenField Web Server Control Overview.
Example
The following code example demonstrates how to use the HiddenField control to store a hidden value on a rendered Web page.
<asp:HiddenField id="HiddenField1" runat="server" value="1"/>
<asp:HiddenField id="HiddenField1" runat="server" value="1"/>
See Also
Concepts
HiddenField Web Server Control Overview