Advantages and disadvantages of Viewstate
November 19, 2008 at 7:10 pm | Posted in ASP.NET | 6 CommentsTags: advantages of Viewstate, disadvantages of Viewstate, state management, viewstate
The primary advantages of the ViewState feature in ASP.NET are:
1. Simplicity. There is no need to write possibly complex code to store form data between page submissions.
2. Flexibility. It is possible to enable, configure, and disable ViewState on a control-by-control basis, choosing to persist the values of some fields but not others.
There are, however a few disadvantages that are worth pointing out:
1. Does not track across pages. ViewState information does not automatically transfer from page to page. With the session approach, values can be stored in the session and accessed from other pages. This is not possible with ViewState, so storing data into the session must be done explicitly.
2. ViewState is not suitable for transferring data for back-end systems. That is, data still has to be transferred to the back end using some form of data object.
6 Comments »
RSS feed for comments on this post. TrackBack URI
mrkuerlg
mrkuerlg
Comment by mrkuerlg— March 28, 2009 #
Good article 🙂
Comment by Robert Riley— March 28, 2009 #
Good article, but need more details on viewstate like encryption,etc….
Comment by David Brent— March 28, 2009 #
Nice one
Comment by Jose— March 28, 2009 #
Great article. Could you please explain view state life cycle in details?
Comment by Johnson Smith— March 28, 2009 #
Website & articles are good.Why dont you update the website with more info?
Comment by test— July 28, 2009 #