W3Schools.com

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
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE