Client Side State Management : Hidden Field

Hidden fields are html input controls with type as hidden type store hidden data in the html. Hidden fields are not displayed on the web browser, but if you view source, you can see both the hidden field and it’s value. Not very secure. They do allow you to post information to other pages, or back to the same you can’t srore sensitive data in hidden fields.

System.Web.UI.WebControls.HiddenField and System.Web.UI.HtmlControls.HtmlInputHidden are two types on hidden control available in
Use Hidden Field when need to post small amout of data post back to it self.

Hidden Fields advantages :

  • Almost all browsers support hidden fields.
  • Using hiddenfield data is stored on html page,so no server resources are required, if it is of type html input type.

Hidden Fields having some drawbacks also :

  • Using large no of hidden field will increase the HTML page size, so loading of page becoming slower.
  • As we can able to view HTML page source, we can abel to see hidden field value so no securtiy.
  • we can only able to save single value in hidden field , not able to save structured data like dataset etc.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s