System.Web.UI.WebControls.ImageButton.GenerateEmptyAlternateText Property

Gets or sets a value indicating whether the control generates an alternate-text attribute for an empty string value.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.Web.UI.Themeable(false)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.ComponentModel.Browsable(false)]
public override bool GenerateEmptyAlternateText { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

By default, the System.Web.UI.WebControls.ImageButton control renders the Image.AlternateText property using an alt attribute. When the Image.AlternateText property is not set, the System.Web.UI.WebControls.ImageButton control does not include the alt attribute to specify the alternate-text in the control rendering.

The XHTML document type definition requires the alt attribute on image controls. However, accessibility best practices recommend that image controls that do not convey information relevant to the context of the Web page should not specify an alt attribute. You can meet both XHTML and accessibility requirements by setting the Image.AlternateText property to true.

This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0