Gets the server control identifier generated by ASP.NET.
Assembly: System.Web (in System.Web.dll)
Sometimes, it is not possible to assign a unique name to a control. For example, if a Repeater control contains a Label control in one of its templates, an instance of that Label control is rendered for each item in the Repeater control. To prevent naming conflicts when multiple instances of a control are rendered, ASP.NET automatically generates a unique value for each server control on a page. The value is generated by concatenating the ID value of the control and the UniqueID value of its parent control. If the ID value of the control is not specified, an automatically generated value is used. Each part of the generated ID is separated by an underscore character (_).
The value generated for a control is identical to the UniqueID value, except that an underscore character is used to delimit the ID values, instead of the character specified by the IdSeparator property. By default, the IdSeparator property is set to a dollar sign ($). Because the value does not contain dollar signs, it can be used in ECMAScript, which does not support IDs that contain dollar signs.
The value is often used to programmatically access the HTML element rendered for a control in client-side script. For details, see Client Script in ASP.NET Web Pages.
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.