Thursday, May 02, 2013

View State

Posted by Rahul Kharde at 3:37 AM

ViewState is used to retain the state of server-side objects between page post backs.

  • ViewState is how ASP.NET Web pages persists data across requests.
  •  ViewState can be encrypted to address security concerns.
  •  ViewState values are accessible with the same page
  •  ViewState is a state management technique build in ASP.NET.
  •  ViewState basically maintains the state of the pages between postbacks.
  •  ViewState maintain the session within the same page.
  •  ViewState allows the state of objects to be stored in a hidden field on the page.

Where the viewstate is stored after the page postback?
Ans: ViewState is stored in a hidden field on the page at client side.  ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.

How long the items in ViewState exists?
Ans: They exist for the life of the current page.

What is the lifespan for items stored in  the ViewState?
Ans: The items stored in ViewState live until the lifetime of the current page expires including postbacks to  same page.

View state is client-side or server side state management techenique?
Ans: View state is client-side state management techenique

How do you enable or disable a ViewState at the page level?
Ans: At the page level you can enable or disable ViewState using EnableViewState property of the page.

What is the name of the hidden form field in which ViewState of the page is saved?
Ans: __ViewState

Is ViewState of one page available to another page?
Ans: No, ViewState of a Page is available only in that page. You cannot access ViewState of one page from another page.

If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!

Kindly Bookmark and Share it:



Have any question? Feel Free To Post Below:


Popular Posts

Recent Comments

© 2011. All Rights Reserved | Help to understand .Net | Template by Blogger Widgets

Home | About | Top