Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

How to: Add ImageButton Web Server Controls to a Web Forms Page 

An ImageButton control allows you to present a picture as a clickable control.


If you want to create an image with clickable regions, you can use the ImageMap control.

To create a graphical button

  1. Type an <asp:ImageButton> element into the page.

  2. Set the button's ImageUrl property to point to an image file (for example, .gif or .jpg).

    You can point to an image file anywhere using a URL or UNC path.

    Security noteSecurity Note

    The URL associated with an ImageButton control can be tampered with by a malicious user. For more information, see How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.