Answer:
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