System.Web.UI.ControlCollection.Add Method

Adds the specified System.Web.UI.Control object to the collection.

Syntax

public virtual void Add (Control child)

Parameters

child
The System.Web.UI.Control to add to the collection.

Remarks

The new control is added to the end of an ordinal index array. The control can be an instance of any ASP.NET server control, a custom server control you create, or a literal control.

To add a control to the collection at a specific index location, use the ControlCollection.AddAt(int, Control) method.

Requirements

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