Search
Author
ASP.NET Tutorials
Author
Sheo Narayan
Advertisements


Winners

Win Prizes

Social Presence
Like us on Facebook

Silverlight Tutorials | Report a Bug in the Tutorial
asp:HiddenField control
HiddenField is used to create a hidden field in the form.
 
Ideally HiddenField is used to create a hidden field in the form. When it is rendered on the page, it is implemented through <input type=hidden> HTML tag.
DEMO : HiddenField Show Source Code
Ex. Example of Label Control
            <asp:HiddenField ID="HiddenField1" runat="Server" Value="This is the Value of Hidden field" />
            <asp:Button ID="Button1" runat="Server" OnClick="ChangeLabelText" Text="Change Label Text to Hiidden Field Value" />                                        
                    
            // CODE BEHIND
            // Fires when Button is clicked
            protected void ChangeLabelText(object sender, EventArgs e)
            {
                Label1.Text = hiddeFieldValue.Value;
            }