System.Web.UI.Page.LoadPageStateFromPersistenceMedium Method

Loads any saved view-state information to the System.Web.UI.Page object.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected virtual object LoadPageStateFromPersistenceMedium ()

Returns

The saved view state.

Remarks

The Page.LoadPageStateFromPersistenceMedium method uses the PageStatePersister.Load method of the System.Web.UI.PageStatePersister object referenced by the Page.PageStatePersister property to load any saved view-state information for the System.Web.UI.Page object.

ASP.NET includes two descendents of the System.Web.UI.PageStatePersister class, the System.Web.UI.HiddenFieldPageStatePersister class that saves state information in a hidden field included in the ASP.NET page, and the System.Web.UI.SessionPageStatePersister class that saves state in the Page.Session object associated with the request.

To save state in the location of your choice, you should create a new descendent of the System.Web.UI.PageStatePersister class that saves and loads state to the persistence medium of your choice. For an example of creating a new System.Web.UI.PageStatePersister object, see the System.Web.UI.PageStatePersister class.

If you are using the .NET Framework version 1.0 or 1.1, override this method if you want to load the System.Web.UI.Page state from anything other than a hidden field. If you choose to do so, you must also override the Page.SavePageStateToPersistenceMedium(object) method.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0