What is Hiddenfield and what are advantages and disadvantages of Hiddenfield?


Hidden fields are used to store data at the page level. These fields are not rendered by the browser. It's just like a standard control for which you can set its properties. Whenever a page is submitted to server, hidden fields values are also posted to server along with other controls on the page.

Ex:
//To Set Value
Hidden1.Value="Set Value Here";
//to retrieve a value
string strGetValue = Hidden1.Value;

Simple to implement and store small amout of data so they take less size.
These won't fit for sensitive data and values can be clearly visisble when passing through the network.

No comments:

Post a Comment