| New Web Server Controls in ASP.Net 2.0 |
| |
| HiddenField Web Server Control |
| |
| HiddenField Web Server Control creates a hidden field that is used to store a non-displayed value. The HiddenField control gives a way to store information in the page without showing it. To place information into a HiddenField control, set its Value property to the value you want to store between postbacks. |
| |
| As with any other Web server control, the information in a HiddenField control is available during PostBack. The information is not persevered outside the page. Therefore, users can change the value of a HiddenField control before the page is posted back to the server, potentially compromising the information. The HiddenField control raises a ValueChanged event if the value of the control changes between postbacks and simply you are able to detect this type of change. You should handle this event for all of the HiddenField controls on the page, if the values of the HiddenField controls hold sensitive information or are necessary for your application to function properly. |
| |
Syntax:
<input type= "hidden"
name=?Hiddenfield?
value=? Hiddenfieldvalue?/> |
| |
|
| |