ASP.NET UniqueIDProperty
Standard Control Property Reference Manual
Definition and Usage
The UniqueID property gets the unique, hierarchically qualified, automatically generated identifier of the control. This property is different from the ID property because the UniqueID property includes the identifier of the control's naming container. This identifier is automatically generated when the page request is processed.
Example
The following example displays the UniqueID of a Button control:
<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
Response.Write("UniqueID is: " & button1.UniqueID)
End Sub
</script>
<form runat="server" >
<asp:Button ID="button1" OnClick="Button1_Click"
Text="Get UniqueID" runat="server" />
</form>
Sub Button1_Click(sender As Object, e As EventArgs)
Response.Write("UniqueID is: " & button1.UniqueID)
End Sub
</script>
<form runat="server" >
<asp:Button ID="button1" OnClick="Button1_Click"
Text="Get UniqueID" runat="server" />
</form>
Demo Example »
Standard Control Property Reference Manual Other Extensions