Image ,Image Button and ImageMap Control in ASP
Image ,Image Button and ImageMap 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.
AlternetText Appears if image not loaded properly or if image is missing in the specified
location.
Image Button
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.
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.
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)