|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
How to: Add ImageButton Web Server Controls to a Web Forms Page (Visual Studio)
You can add anWeb server control to your Web Forms page when you want to display a picture, or image, as a hyperlink.
To create an image with multiple clickable regions, you can use thecontrol. For details, see .
To add an ImageButton Web server control to a Web Forms page
From the Standard tab of the Toolbox, drag an ImageButton Web server control onto the page.
In the Appearance category of the Properties window, set the button'sproperty to point to an image file (.gif, .jpg, and so on).
Click the ellipsis (...) button in the ImageUrl property box to select an image using the Select Image dialog box.
You can point to an image file anywhere by using a URL or UNC path.
The URL associated with an ImageButton control can be tampered with by a malicious user. For more information,.