Panel.SupportsDisabledAttribute 屬性


取得值,這個值表示當控制項的 disabled 屬性為 IsEnabled 時,控制項是否應該將呈現之 HTML 項目的 false 屬性設為 "disabled"。Gets a value that indicates whether the control should set the disabled attribute of the rendered HTML element to "disabled" when the control's IsEnabled property is false.

 virtual property bool SupportsDisabledAttribute { bool get(); };
public override bool SupportsDisabledAttribute { get; }
member this.SupportsDisabledAttribute : bool
Public Overrides ReadOnly Property SupportsDisabledAttribute As Boolean



true 如果 RenderingCompatibility 屬性指出 ASP.NET 的版本低於 4.0,則為,否則為 falsetrue if the RenderingCompatibility property indicates an ASP.NET version lower than 4.0; otherwise, false.


這個屬性會指出當控制項停用時,ASP.NET 應該如何呈現控制項的 HTML。This property indicates how ASP.NET should render HTML for a control when the control is disabled. 如果這個屬性為 true ,ASP.NET disabled 會在控制項停用時轉譯屬性。If this property is true, ASP.NET renders a disabled attribute when a control is disabled. 如果這個屬性為 false ,ASP.NET class 會在控制項停用時轉譯屬性。If this property is false, ASP.NET renders a class attribute when a control is disabled. 如需詳細資訊,請參閱WebControl.SupportsDisabledAttributeFor more information, see WebControl.SupportsDisabledAttribute.