Bearbeiten

Freigeben über


Page.LoadPageStateFromPersistenceMedium Method

Definition

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

protected:
 virtual System::Object ^ LoadPageStateFromPersistenceMedium();
protected public:
 virtual System::Object ^ LoadPageStateFromPersistenceMedium();
protected virtual object LoadPageStateFromPersistenceMedium ();
protected internal virtual object LoadPageStateFromPersistenceMedium ();
abstract member LoadPageStateFromPersistenceMedium : unit -> obj
override this.LoadPageStateFromPersistenceMedium : unit -> obj
Protected Overridable Function LoadPageStateFromPersistenceMedium () As Object
Protected Friend Overridable Function LoadPageStateFromPersistenceMedium () As Object

Returns

The saved view state.

Remarks

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

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

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

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

Applies to

See also