System.Web.UI Namespace Control Class
Returns the unique, hierarchically-qualified identifier for a control.
This property can only be used programmatically; it cannot be set when declaring the control.
The fully-qualified identifier for a control.
This identifier is generated automatically when a page request is processed.
This property differs from the ID property, in that its value includes the identifier for the server control's naming container.
UniqueID is particularly important in differentiating server controls contained within a data-bound list control, such as the Repeater, DataList, and DataGrid controls.
These controls serve as the naming container for their child controls, creating a unique namespace so that the ID property values of the child controls do not conflict.
For example, consider a case where you include a Label control in a Repeater control, and you assign the Label control an ID of myLabel, and the Repeater an ID of myRepeater.
If you bind the Repeater to a data source with three entries, the resulting UniqueID properties for each instance of the Label controls would be myRepeater:ctl0:myLabel, myRepeater:Ctl1:myLabel, and myRepeater:Ctl2:myLabel.
Control Members