0% found this document useful (0 votes)
2 views

Image ,Image Button and ImageMap Control in ASP

The document explains the use of Image Control, ImageButton, and ImageMap in ASP.NET for rendering images on web pages. It outlines important properties for each control, such as ImageUrl, AlternateText, and Tooltip, as well as functionalities like clickable images and hotspot regions. The document emphasizes the implementation of these controls through corresponding HTML tags and their styling properties.

Uploaded by

muskansh7860
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Image ,Image Button and ImageMap Control in ASP

The document explains the use of Image Control, ImageButton, and ImageMap in ASP.NET for rendering images on web pages. It outlines important properties for each control, such as ImageUrl, AlternateText, and Tooltip, as well as functionalities like clickable images and hotspot regions. The document emphasizes the implementation of these controls through corresponding HTML tags and their styling properties.

Uploaded by

muskansh7860
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Image Control in ASP.

NET

Ideally Image control is used to place an image on the page. When it is rendered on the page, it is
implemented through <img /> HTML tag.

Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height


etc. are implemented through style properites of <img>.

Following are some important properties that are very useful.


ImageUrl Url of image location.

AlternetText Appears if image not loaded properly or if image is missing in the specified
location.

Tooltip Text message Appearing on mouse over the image

ImageAlign Used to align the Text beside image.

Image Button

The ImageButton control is used to display a clickable image.

ImageButton control is generally used to post the form or fire an event either client side or server
side. When it is rendered on the page, generally it is implemented through <input type=image >
HTML tag.

Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height


etc. are implemented through style properites of <input> tag. You can set its Image location
either by setting ImageURL properties in the .aspx page or from server side page. (other
properties can also be set from both pages)

Following are some important properties that are very useful.


ImageUrl Gets or Sets the location of the image to display.

CausesValidation Value can be set as true/false. This indicates whether validation should be
performed when a button is clicked.

PostBackUrl Indicates the URL on which the Form will be posted back.

ValidationGroup Gets or Sets the name of the validation group that the button belongs to. This
is used to validate only a set of Form controls with a Button.
ImageMap Control

ImageMap control is used to create an image that contains clickable hotspot region. When user
click on the region, the user is either sent to a URL or a sub program is called. When it is
rendered on the page, it is implemented through <img /> HTML tag.

Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height


etc. are implemented through style properites of <img>.

Following are some important properties that are very useful.


ImageUrl Url of image location.

AlternetText Appears if image not loaded properly

Tooltip Appears when on mouse over the image

ImageAlign Used to align the Text beside image.

HotSpotMode PostBack/Navigate .... When Navigate, the user is navigated to a different URL.
In case of PostBack, the page is posted back to the server.

OnClick Attach a server side event that fires after clicking on image when
HostSpotMode is PostBack.

PostBackValue You can access it in the server side click event through ImageMapEventArgs.
(eg. e.PostBackValue)

You might also like