ASP.NET Enabled 屬性


Web 控件標準屬性參考手冊 Web 控件標準屬性參考手冊

定義和用法

Enabled 屬性用於啟用或禁用控件。

語法

<asp:webcontrol id="id" Enabled=true|false runat="server" />


實例

下麵的實例禁用一個 Button 控件:

<html>
<body>

<form runat="server">
<asp:Button id="Button2" Enabled=False Text="Submit" runat="server"/>
</form>

</body>
</html>


Web 控件標準屬性參考手冊 Web 控件標準屬性參考手冊