Link to home
Start Free TrialLog in
Avatar of dizzycat
dizzycat

asked on

Make an image hyperlink

Hi guys
Using visual web developer 2008 express, how can i make an image or an image button into a hyperlink to navigate to another of my websites pages, i have looked at all the controls in the toolbox and all of the properties of each control but cannot achieve this.
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Hi dizzycat,
You can wrape your image tag like this
<a href="target site"><img src="myimg.jpg"/></a>
Regards,
Chinmay


Avatar of proton77
proton77

ASKER CERTIFIED SOLUTION
Avatar of designweboxx
designweboxx
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
By the way... if you want to use an ImageButton (which I wouldn't recommend for SEO Reasons) you'd place your ImageButton and put the following code into the OnClick Event:

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
   Response.Redirect("http://example.com");
}

But please note, that the link target won't be visible to anyone until they have clicked the button and are being redirected to that page.
Avatar of dizzycat

ASKER

Great!
Thanks for your help.