ASP.NET Enabled Property

Definition and Usage

The Enabled property is used to enable or disable controls.

Syntax

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

Example

This example disables a button control:

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

Example

Disable button control