Page.LoadPageStateFromPersistenceMedium Método

Definição

Carrega todas as informações de estado de exibição salvas no objeto Page.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

Retornos

Object

O estado de exibição salvo.The saved view state.

Comentários

O LoadPageStateFromPersistenceMedium método usa o Load método do System.Web.UI.PageStatePersister objeto referenciado pela PageStatePersister propriedade para carregar qualquer informação de estado de exibição salva para o Page objeto.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 inclui dois descendentes da PageStatePersister classe, a HiddenFieldPageStatePersister classe que salva informações de estado em um campo oculto incluído na página ASP.net e a SessionPageStatePersister classe que salva o estado no Session objeto associado à solicitação.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.

Para salvar o estado no local de sua escolha, você deve criar um novo descendente da PageStatePersister classe que salva e carrega o estado no meio de persistência de sua escolha.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. Para obter um exemplo de como criar um novo PageStatePersister objeto, consulte a PageStatePersister classe.For an example of creating a new PageStatePersister object, see the PageStatePersister class.

Se você estiver usando o .NET Framework versão 1,0 ou 1,1, substitua esse método se desejar carregar o Page estado de qualquer coisa que não seja um campo oculto.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. Se você optar por fazer isso, também deverá substituir o SavePageStateToPersistenceMedium método.If you choose to do so, you must also override the SavePageStateToPersistenceMedium method.

Aplica-se a

Confira também