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
ASP.Net 2.0 Training
VS File Management
ASP.Net Image
ASP.Net Checkbox
ASP.Net ImageButton
ASP.Net RadioButton
ASP.Net Literal
ASP.Net Panel
ASP.Net LinkButton
ASP.Net Calendar
ASP.Net BulletedList
ASP.Net FileUpload
ASP.Net User Controls
ASP.Net PlaceHolder
ASP.Net Lists
ASP.Net CheckBoxList
ASP.Net DropDownList
ASP.Net Data Access
ASP.Net DetailsView
ASP.Net FormView
ASP.Net Repeater Control
ASP.Net:Master Pages
Sending EMail
MultiView
Tabbed MultiView
ASP.Net:Wizard Control
Login Controls 1
ASP.Net:Site Navigation
ASP.Net:Classes
ASP.Net:SQLDataSource Control
ASP.Net:Error Handling
ASP.Net:dataTables
ASP.Net:datasets

Visit my other site:

Free Flash 8 tutorials and training

Free Dreamweaver Video Tutorials

Free PHP 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