BaseDataBoundControl.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.

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

属性值

如果 RenderingCompatibility 属性指示 ASP.NET 版本低于4.0,则为 true;否则,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.

适用于

另请参阅