Viewstate
advantages and disadvantage of viewstae in asp.net.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
kiran kumarRank #3,110 · 461 reputationPosted Feb 26, 2010, 12:34 AM EST
- No server resources required
- simple implementation
- automatic retention of page and control state
- Enhanced security features. The values in view state are hashed, compressed, and encoded for Unicode implementations.
Disadvantages:
- Performance. The view state is stoed in the page itself, so increase the page size.
- Security. The view state is stoed in a hidden field on the page. Although view state stores data in a hashed format, it can be tampered with.
Lalit MRank #1,186 · 1.5K reputationPosted Feb 26, 2010, 12:02 AM EST
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.
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.