See Also: Image Members
In this topic:
The System.Web.UI.WebControls.Image control lets you work with images from server code. Use the System.Web.UI.WebControls.Image control to display any valid image supported by the requesting browser on the Web page. The path to the displayed image is specified by setting the Image.ImageUrl property. You can specify the text to display in place of image when the image is not available by setting the Image.AlternateText property. The alignment of the image in relation to other elements on the Web page is specified by setting Image.ImageAlign property.
This control only displays an image. If you need to capture mouse clicks on the image, use the System.Web.UI.WebControls.ImageButton control.
For information about how to configure this control so that it generates markup that conforms to accessibility standards, see Accessibility in Visual Studio 2010 and ASP.NET 4 and ASP.NET Controls and Accessibility.
Example
<asp:Image AccessKey="string" AlternateText="string" BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="