This control enables a developer to store a non-displayed value in the rendered HTML of the page. The HiddenField control is used to store a value that needs to be persisted across multiple postbacks to the server.
It is rendered as an <input type= "hidden"/> element. This control was introduced by ASP.NET 2.0.
Normally view state, session state, and cookies are used to maintain the state of a Web Forms page. However, if these methods are disabled or are not available, you can use the HiddenField control to store state values. Note that because the value of a HiddenField is rendered to the client browser, it is not suitable for storing security-sensitive values. To specify the value for HiddenField a control, use the Value property. You can provide a routine that gets called everytime the value of the HiddenField control changes between postbacks to the server by creating an event-handler for the ValueChanged event. Hidden field is also used many a times when we need to work with a value in both server side and client side.
Note: In order to use HiddenField ou've to use HTTP-Post method to post web page. Unlike to its name, its value is not hidden.
Whitepapers/Blogs
Revision number 3, Thursday, August 06, 2009 4:34:33 PM by shatru
You must Login to comment.
|
Fri, Aug 14, 2009 8:16 AM
by csharppointer
|
nice one there will be atleast 1 screen where we need hidden fields in each asp.net project
|
|
Sun, Apr 25, 2010 7:43 AM
by Noorstudio
|
How would I be able to get the value of a hidden field that was programatically created?
|
|
Wed, Sep 15, 2010 11:54 AM
by jagdeepgupta813
|
what is the use of visible property in it
|
|
Fri, Sep 17, 2010 4:40 PM
by alex440
|
How would I be able to get the value of a hidden field that was programatically created?
|
|
Fri, May 20, 2011 6:35 PM
by shellymn
|
What is the maximum size of data kept in hidden feild ?
|
|
Fri, Jul 1, 2011 7:26 AM
by taha_ash
|
what kind of data you want to transfer
|
|
Mon, Nov 28, 2011 1:32 PM
by srinathgnath
|
Hi...there is no limit for storing data in hidden field... Performance considerations Because hidden fields are stored in the page itself, storing large values can cause the page to slow down when users display it and when they post it. Storage limitations If the amount of data in a hidden field becomes very large, some proxies and firewalls will prevent access to the page that contains them. Because the maximum amount can vary with different firewall and proxy implementations, large hidden fields can be sporadically problematic. Check the below link ::
http://msdn.microsoft.com/en-us/library/z1hkazw7.aspx
|
|
Mon, Nov 28, 2011 1:36 PM
by srinathgnath
|
It indirectly depends on max length of web request can be made...that can be set (maxRequestLength) in web.config file. httpRuntime executionTimeout="100" requestLengthDiskThreshold="8192" maxRequestLength="1024" />
|
|
Tue, Jan 17, 2012 3:18 AM
by ajaijamwal
|
How do i use css on to the hidden field control in asp.net ?
|