Saturday 15 September 2012

Beginning .Net : Set Alternate Text for Image tag

Alternate text for Image is helpful when certain reason Image is not displayed in browser. If Image is not displayed at that time alternate text is helpful to end user.
Alternate text display instead of image and end use know that here is image and this image is for what.
For that you need to set "alt" property of "Img" tag.

Here is example for this.
In this example we take one html image tag and set it's alternate text and we provide image source file name that does not exist.

ASPX Code : 

      Image : <img src="ttt.png"  alt="Click hete to know more." width="100" height="50" />

Output : 

For Beginning .Net articles. Click Here...

This type of .Net Tips is very useful in day to day programming life.

Note : Give Us your valuable feedback in comments. Give your suggestions in this article so we can update our articles accordingly that.




No comments:

Post a Comment