ASP.NET ClientID 属性
2018-09-07 20:05 更新
ASP.NET ClientID 属性
控件标准属性参考手册
定义和用法
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>
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>
演示实例 »
控件标准属性参考手册
以上内容是否对您有帮助:
更多建议: