ASP.NET EnabledProperties


Web 控件标准属性参考手册Web Controls Standard Properties Reference

Definition and Usage

The Enabled property is used to enable or disable a control.

Syntax

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


Example

The following example disables a Button control:

<html>
<body>

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

</body>
</html>

Run Example »

Web 控件标准属性参考手册Web Controls Standard Properties Reference Other Extensions