Skip Navigation LinksASP.Net 2.0 Training : ASP.Net Image
Banner for ASP.Net 2.0 training classes in Visual Basic 2005 

Skip Navigation Links
Visit my other site:

certification training

Free Flash tutorials and training

Free Dreamweaver Video Tutorials

Free PHP Training

Visual Basic Windows Training




If you like this site please link to it


ASP:Image

  • The Image control is used to display an image.

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"

Download the following image:
http://www.morosko.com/comics1.gif
save it to the c:\inetpub\wwwroot directory

Try this:

1

<html>

2

<body>

3

<form runat="server">

4

<asp:Image runat="server" AlternateText="Ad" ImageUrl=" comics1.gif " />

5

</form>

6

</body>

7

</html>

Save as: ImageEx.aspx

alternate method in visual studio

Try this in Visual Studio:
  • Open Visual Studio
  • Add a new webform
  • Name it ImageEx.aspx
  • Add an Image control

ASP.Net Image control

  • In the properties window change the AlternateText property to Ad
  • Add an existing item and select the comics1.gif file
  • Select the image control again
  • Click on the ellipsis in the imageURL property

ASP.Net ImageURL property

  • Add the Comics1.gif image file
  • Test it

      ASP.Net 2.0 tutorials & training