What is the namespace used for ViewState.

 Posted by vishalneeraj-24503 on 12/25/2013 | Category: ASP.NET Interview questions | Views: 4114 | Points: 40

We use System.Web.UI.StateBag namespace to work with ViewState.

Statebag classManages the view state of ASP.NET server controls,including pages.The .NET Framework provides a StateBag class that allows preserving view state while working within one page.If the user will be posting data back to the server while staying on the same page, we can use a StateBag object to hold multiple intermediate values for this page

Viewstate comes under System.Web.UI.StateBag namespace.
Basically,ViewState is stored in a hidden html field.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response