HiddenField control

HiddenField control

The HiddenField control provides you with a way to store information in the page without displaying it. For example, you might store a user-preference setting in a HiddenField control.

To add a HiddenField control to a page

  • Drag the HiddenField control from the Toolbox task pane to your page.

Cc295019.alert_note(en-us,Expression.10).gifNote:

Because there is no visual representation of a HiddenField control, you won't be able to see it in Design view, but you can see the control in Code view.

To put information into a HiddenField control, you 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 persisted outside the page.

The information in a HiddenField control is not displayed when the browser renders the page, but users can see the contents of the control by viewing the page's source. Therefore, do not store sensitive information in a HiddenField control, such as user IDs, passwords, or credit card information.

Community Additions

ADD
Show:
© 2016 Microsoft