What are the disadvantages of viewstate/what are the benefits?

Q

What are the disadvantages of viewstate/what are the benefits?

✍: Guest

A

Answer1:
Disadvantage of viewstate is that additional data is sent to the browser. The benefits are that you do not have to manually manage refreshing the page fields after a submit, (when re-displaying the same page).

Answer2:
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.

2014-02-11, 1618👍, 0💬