ASP.NET Image Control
Web Server Controls
Definition and Usage
The Image control is used to display an image.
property
| property | Description | .NET |
|---|---|---|
| AlternateText | Alternative text for the image. | 1.0 |
| DescriptionUrl | The location of a detailed description of the image. | 2.0 |
| GenerateEmptyAlternateText | Specifies whether the control creates an empty string as alternative text. | 2.0 |
| ImageAlign | Specifies the alignment of the image. | 1.0 |
| ImageUrl | The URL of the image that displays this link | 1.0 |
| runat | Specifies that the control is a server control. Must be set to "server". | 1.0 |
Web Control Standard Properties
AccessKey, Attributes, BackColor, BorderColor, BorderStyle, BorderWidth, CssClass, Enabled, Font, EnableTheming, ForeColor, Height, IsEnabled, SkinID, Style, TabIndex, ToolTip, Width
For a complete description, please visit Web Control Standard Properties。
Web Control Standard Properties
AppRelativeTemplateSourceDirectory, BindingContainer, ClientID, Controls, EnableTheming, EnableViewState, ID, NamingContainer, Page, Parent, Site, TemplateControl, TemplateSourceDirectory, UniqueID, Visible
For a complete description, please visit Web Control Standard Properties。
Example
Image
In this example, we declare an Image control in the .aspx file.
Web Server Controls