What is ViewState?

ASP.NET Web page to persist changes to the state of a Web Form across postbacks
The view state of a page is, by default, placed in a hidden form field named __VIEWSTATE.
This hidden form field can easily get very large, on the order of tens of kilobytes.

  • No server resources.
  • Viewstate ensures security because it stores the data in encrypted format.
  • Viewstates are simple. They are used by enabling or disabling the viewstate properties.
  • It is based on the wish of developer that they want to implement it at the page level or at control level.
  • If large amount of data is stored on the page, then page load might cause a problem. 
  • Does not track across pages. Viewstate information does not automatically transfer from page to page.


Post a Comment