Gets an object that can be used to synchronize access to the collection of controls.
Assembly: System.Web (in System.Web.dll)
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 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.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.