Link to home
Start Free TrialLog in
Avatar of gbreddy
gbreddy

asked on

viewstate management

Hi Experts

1)What is VIEWSTATE in ASP.NET?
2)Usere can view the data in the VIEWSATE?
3)Where it stores the data, client side/server side?
4)Is it possible to modify the content of viewstate?
5)If we disable the viewstate what will happen?

with regards
Gopi
SOLUTION
Avatar of igor_alpha
igor_alpha

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of barisgomlek
barisgomlek

And this code can be used to save viewstate to session:

protected override object LoadPageStateFromPersistenceMedium()
{
      return Session["ViewState"];
}

protected override void SavePageStateToPersistenceMedium(object viewState)
{
      Session["ViewState"] = viewState;

      // Bug requires Hidden Form Field __VIEWSTATE
      RegisterHiddenField("__VIEWSTATE", "");
}
Avatar of gbreddy

ASKER

can VIEWSTATE maintain the STATE of the page ?
Yes, if you use it efficiently, it can.