ControlCollection::Count Property
.NET Framework (current version)
Gets the number of server controls in the ControlCollection object for the specified ASP.NET server control.
Assembly: System.Web (in System.Web.dll)
Implements
ICollection::CountThe following code example demonstrates how to use the Count property to iterate through a control's ControlCollection object. The use of the Control::HasControls property verifies that the control has child controls. If Control::HasControls returns false, the remaining code does not run.
.NET Framework
Available since 1.1
Available since 1.1
Show: