ASP.NET ClientID 属性
ASP.NET ClientID 属性获取由 ASP.NET 自动生成的控件标识符
范例
下面的范例显示 Button 控件的 ClientID
<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>