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:
  • NotSet
  • AbsBottom
  • AbsMiddle
  • BaseLine
  • Bottom
  • Left
  • Middle
  • Right
  • TextTop
  • Top
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:
W3Schools

In this example we declare an Image control in an .aspx file.

posted on 2007-03-27 09:18  改变热爱  阅读(136)  评论(0)    收藏  举报

导航