HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

ASP.NET AlternateText Property


Image Control Reference Complete Image Control Reference

Definition and Usage

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

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

The alternate text displays as a ToolTip if your browser supports it (Internet Explorer)

Syntax

<asp:Image AlternateText="text" runat="server" />
 
Attribute Description
text Specifies an alternate text for the image


Example

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

<form runat="server">
<asp:Image id="Img1" ImageUrl="missing_img.gif"
runat="server" AlternateText="Image Text" />
</form>

Show example »

Image Control Reference Complete Image Control Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE