System.Web.UI.HtmlControls Namespace HtmlInputImage Class
Sets or retrieves the alternative text to display if the image is unavailable.
Inline |
<input type=image alt = strAltTxt ... > |
Script |
HtmlInputImage.Alt [ = strAltTxt ] |
strAltTxt |
String that specifies the alternative text to display. |
The property is read/write with no default value.
Use this property to specify the caption displayed when the image specified by the Src property is unavailable. On newer browsers, the text also displays in the image placeholder before the graphic has loaded, and acts as a ToolTip when the mouse hovers over the graphic.
This property is similar in function to HtmlImage.Alt.
The below code shows how to declaratively set the Alt property of an HtmlInputImage control at design time.
<input type=image src="myPix.jpg" alt="Simply awesome" runat="server" ... >
HtmlInputImage Members