WebControl.LoadViewState(Object) 方法

定义

从用 SaveViewState() 方法保存的上一个请求还原视图状态信息。Restores view-state information from a previous request that was saved with the SaveViewState() method.

protected:
 override void LoadViewState(System::Object ^ savedState);
protected override void LoadViewState (object savedState);
override this.LoadViewState : obj -> unit
Protected Overrides Sub LoadViewState (savedState As Object)

参数

savedState
Object

一个表示要还原的控件状态的对象。An object that represents the control state to restore.

注解

此方法主要由 .NET Framework 基础结构使用,不应在代码中直接使用。This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. 不过,控件开发人员可以重写此方法,以指定自定义服务器控件如何还原其视图状态。However, control developers can override this method to specify how a custom server control restores its view state. 有关详细信息,请参阅ASP.NET 状态管理概述For more information, see ASP.NET State Management Overview.

LoadViewState 方法还原在上一个 SaveViewState 请求期间保存的视图状态信息。The LoadViewState method restores the view-state information that was saved during a previous SaveViewState request. WebControl 类将重写基 LoadViewState 方法以处理 ViewStateStyleAttributes 属性。The WebControl class overrides the base LoadViewState method to handle the ViewState, Style, and Attributes properties.

适用于

另请参阅