HiddenField

 Rate It (1)

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.

Whitepapers/Blogs

Revision number 2, Monday, February 18, 2008 11:53:33 PM by haidar_bilal

Comments

Shortcuts

Table of Contents

Top Wiki Contributors

(last 30 days)

  1. bmains (13)
  2. XIII (13)
  3. vik20000in (8)
  4. mbanavige (7)
  5. anas (5)
  6. tmorton (5)
  7. k_nitin_r (3)
  8. binoj7 (3)
  9. scott@elbandit.co.uk (2)
  10. sciguy65 (1)

Advertise Here