What are the disadvantages and benefits of view state?

 Posted by Babu_akkandi on 4/13/2009 | Category: ASP.NET Interview questions | Views: 14803

Automatic view-state management is a feature of server controls that enables them to repopulate their property values on a round trip (without you having to write any code). This feature does impact performance, however, since a server control's view state is passed to and from the server in a hidden form field. You should be aware of when view state helps you and when it hinders your page's performance.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Mukul on: 6/23/2009
ViewState automatically ratain values of the controls during the postbacks of the same page.
Advantages -
- As it works at client side so it don't put much load on server.
- Simple in use.
- The values of the controls saved in hashed,compressed,encoded manner so providing security.
Disadvantage -
- If the page contain very much controls then Viewstate might affect the performance of the page.

Login to post response