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. 当初始化服务器控件时,ASP.NET 将自动调用 TrackViewState 方法。The TrackViewState method is called automatically by ASP.NET when a server control is initialized.

适用于

另请参阅