System.Web.UI.Control.ClearChildState Method

Deletes the view-state and control-state information for all the server control's child controls.

Syntax

protected void ClearChildState ()

Remarks

The Control.ClearChildState method clears all view-state and control-state information for child controls. It is equivalent to calling both the Control.ClearChildViewState method and the Control.ClearChildControlState method.

When recreating child controls of a System.Web.UI.Control object, use the Control.ClearChildState method to clear child state so that it does not get applied to the new controls inadvertently.

Requirements

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