WebControl.TrackViewState 方法

定義

讓控制項追蹤其檢視狀態的變更,以便將這些變更儲存在物件的 ViewState 屬性中。Causes the control to track changes to its view state so they can be stored in the object's ViewState property.

protected:
 override void TrackViewState();
protected override void TrackViewState ();
override this.TrackViewState : unit -> unit
Protected Overrides Sub TrackViewState ()

備註

TrackViewState方法主要是由控制項開發人員使用。The TrackViewState method is used primarily by control developers.

TrackViewState 標示起點,開始追蹤並儲存控制項之檢視狀態的變更。The TrackViewState marks the starting point at which to begin tracking and saving changes to the view state for the control. TrackViewState初始化伺服器控制項時,ASP.NET 會自動呼叫此方法。The TrackViewState method is called automatically by ASP.NET when a server control is initialized.

適用於

另請參閱