Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET Image AlternateText Property

ASP.NET Image AlternateText Property


Image Control Image control


Definition and Usage

The AlternateText property is used to set or return the alternate text for the image.

This property specifies the text to display if the image is not available.

When supported by the browser (Internet Explorer), the alternate text is displayed as a tooltip.

Syntax

/>

 

property Description
text Specifies the alternate text for the image.

Example

The following example sets the AlternateText property on an Image control (the image file does not exist):

runat="server" AlternateText="Image Text" />

Demo Example »


Image Control Image control