System.Web.UI.Control.TrackViewState Method

Causes tracking of view-state changes to the server control so they can be stored in the server control's System.Web.UI.StateBag object. This object is accessible through the Control.ViewState property.

Syntax

protected virtual void TrackViewState ()

Remarks

This method is called automatically at the end of the Control.Init event in the server control's lifecycle.

Invoke this method when you develop templated data-bound controls. This method alerts ASP.NET to monitor changes to a server control's view state, which is required when you override the Control.DataBind method.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0