Assembly: System.Web (in system.web.dll)
/** @property */ public String get_AssociatedControlID () /** @property */ public void set_AssociatedControlID (String value)
public function get AssociatedControlID () : String public function set AssociatedControlID (value : String)
Property ValueA string value corresponding to the ID for a server control contained in the Web form. The default is an empty string (""), indicating that the Label control is not associated with another server control.
Use the AssociatedControlID property to associate a Label control with another server control on a Web form. When a Label control is associated with another server control, its attributes can be used to extend the functionality of the associated control. You can use the Label control as a caption for another control, or you can set the tab index or hot key for an associated control.
When the AssociatedControlID property is set, the Label control renders as an HTML label element, with the for attribute set to the ID property of the associated control. You can set other attributes of the label element using the Label properties. For example, you can use the Text and AccessKey properties to provide the caption and hot key for an associated control.
|Walkthrough: Creating an Accessible Web Application||Building ASP .NET Web Applications in Visual Studio|
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Other ResourcesHow to: Set Access Keys for ASP.NET Web Server Controls
Label Web Server Control
How to: Use Label Web Server Controls as Captions
Walkthrough: Creating an Accessible Web Application
How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings