ASP.NET Enabled 属性

定义和用法
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>
<body>
<form runat="server">
<asp:Button id="Button2" Enabled=False Text="Submit" runat="server"/>
</form>
</body>
</html>
演示实例 »
