Pages having web forms, which provide the ASP.NET ViewState property as a built-in structure to retain values automatically between multiple requests for the same page. It is maintained as a hidden field in page.
Example
ABC is an application, which uses user’s information that is used in the page and not necessarily part of any control, this information can be stored in the ViewState.
ViewState property is mentioned in between the form tags.
Syntax
The syntax for ViewState is
[html]
<form>
<input type="hidden" name="spViewState" value="yfdth12vg16686cgf25 +tshv15hg58ggdea45h=">
</form>
[/html]
Advantages
Advantages of using ViewState are
It can be implemented in a very simple manner.
Data can be stored in a secured mode as those are compressed, encoded and hashed in ViewState.
No server resource is used as ViewState is contained within the page.