Web Server Controls->ASP.NET Image Control
Definition and Usage
The Image control is used to display an image.
Properties
| Property | Description |
|---|---|
| AlternateText | An alternate text for the image |
| Enabled | Specifies whether this control is enabled |
| Font | Specifies the font for the alternate text |
| id | A unique id for the control |
| ImageAlign | Specifies the alignment of the image. Legal values are:
|
| ImageUrl | The URL of the image to display for the link |
| runat | Specifies that the control is a server control. Must be set to "server" |
Examples
Image
ASPX Source:
| <html> <body> <form runat="server"> <asp:Image runat="server" AlternateText="W3Schools" ImageUrl="/banners/w6.gif"/> </form> </body> </html> |
Output Result:
![]() |
In this example we declare an Image control in an .aspx file.

浙公网安备 33010602011771号