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方法會還原先前要求期間儲存的檢視狀態資訊 SaveViewStateThe 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.

適用於

另請參閱