What is ViewState?
Viewstate is a built-in structure for automatically retaining values between multiple requests for the same page. Viewstate is internally maintained as a hidden field on the page but is hashed, providing greater security than developer-implemented hidden fields do.
How do we ensure viewstate is not tampered?
View state is a simple HTML hidden field. So it’s possible very much possible that some one can tamper this hidden field easily. To ensure that viewstate is not tampered we can set the “EnableViewStateMac” attribute to true. This attribute is found in the “page” directive in ASPX page.Below is a simple code snippet which shows how to use the same.
Does the performance for viewstate vary according to User controls?
Performance of viewstate varies depending on the type of server control to which it is applied. Label, TextBox, CheckBox, RadioButton, and HyperLink are server controls that perform well with ViewState. DropDownList, ListBox, DataGrid, and DataList suffer from poor performance because of their size and the large amounts of data making roundtrips to the server.
See following video on importance of session and viewstate: -
Click and see here for more stuff on complete learning tutorials on ASP.NET.