Can we save ViewState on the server side?

 Posted by Ddd on 3/22/2011 | Category: ASP.NET Interview questions | Views: 3352 | Points: 40

Yes, we can save ViewState on the server side.

But we have to override two virtual methods known as

LoadPageStateFromPersistenceMedium() and SavePageStateToPersistenceMedium() of System.Web.UI.Page class on the .aspx page.

protected internal virtual void SavePageStateToPersistenceMedium(
Object state)


protected override Object LoadPageStateFromPersistenceMedium()

//Override these 2 methods on web page.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response