ControlCollection::IsReadOnly Property
.NET Framework (current version)
Gets a value indicating whether the ControlCollection object is read-only.
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System::Booleantrue if the control is read-only; otherwise, false. The default is false.
The following code example creates a method that enumerates through the ControlCollection collection of a Button control, myButton. When the enumerator is created, the IsSynchronized property is checked to see if the operation is thread safe, and if it is not, the SyncRoot property is used to obtain an object to make the operation thread safe. When the enumeration is complete, the value of the IsReadOnly property is written as the Text property of a Label control on the containing page.
.NET Framework
Available since 1.1
Available since 1.1
Show: