ControlCollection::Add Method (Control^)
.NET Framework (current version)
Adds the specified Control object to the collection.
Assembly: System.Web (in System.Web.dll)
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown if the child parameter does not specify a control. |
| HttpException | Thrown if the ControlCollection is read-only. |
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 AddAt method.
.NET Framework
Available since 1.1
Available since 1.1
Show: