ASP.NET ClientID Property

Definition and Usage

The ClientID property retrieves the server control identifier generated by ASP.NET.

Example

This example demonstrates the ClientID of the button control:

<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
  Response.Write("The ClientID of the button is: ")
  Response.Write(button1.ClientID)
End Sub
</script>
<form runat="server" >
<asp:Button ID="button1" OnClick="Button1_Click"
Text="Get ClientID" runat="server" />
</form>

Example

Display the ClientID of the Button Control