This documentation is archived and is not being maintained.

ControlIDConverter Class

Provides a type converter that retrieves a list of control IDs in the current container.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public class ControlIDConverter extends StringConverter

The ControlIDConverter class derives from the StringConverter class and provides a list of control IDs for display in a property grid control in design-time environments. The ControlIDConverter class also serves as the base class for the AssociatedControlConverter and ValidatedControlConverter classes, which are type converters for Web controls and controls that support validation property attributes, respectively.

For more information about type converters, see How to: Implement a Type Converter or Generalized Type Conversion.

The following code example demonstrates how to use the ControlIDConverter in a class that requires a TypeConverter to render the ID of a control. The DebugInfoControl is a simple control that prints out some information on a control contained by the current Web Form. Its ControlID property is decorated with a TypeConverterAttribute that designates the ControlIDConverter as the TypeConverter to use for that property. The DebugInfoControloverrides the Render method to print out information about the target control in a Label control.

No code example is currently available or this language may not be supported.

The following code example demonstrates how the DebugInfoControl can be used in a Web Form along with an AccessDataSource control to display information about the AccessDataSource control.

No code example is currently available or this language may not be supported.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0