ASP.NET ClientIDProperty


控件标准属性参考手册Control Standard Properties Reference Manual

Definition and Usage

The ClientID property gets the control identifier automatically generated by ASP.NET.


Example

The following example displays 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>

Demo Example »

控件标准属性参考手册Control Standard Properties Reference Manual Other Extensions