System.Web.UI.ControlCollection.Clear Method

Removes all controls from the current server control's System.Web.UI.ControlCollection object.

Syntax

public virtual void Clear ()

Remarks

Use this method to empty a custom control's System.Web.UI.ControlCollection when you override the Control.CreateChildControls and Control.DataBind methods. Do this when you develop composite, templated controls or templated data-bound controls.

Requirements

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