Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ImageButton to send email

Status
Not open for further replies.

Strobeman

Programmer
May 16, 2003
40
AU
I have some text to send an email which works great using href ="mailto:myemail@mydomain.com".
Now I need to place an image next to the text and allow the users to have the option of clicking the image when they want to send us an email.
So far I have not been able to figure out how to attach the mailto to an image.
I tried putting this code behind an OnClick but it only gave me half a solution.
Response.Redirect("mailto:myemail@mydomain.com");
Any tips would be most appreciated.
Thanks
 
[tt]<a href="mailto:myemail@mydomain.com"><img src="myimg.gif" /></a>[/tt]

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.

Enable Apps
 
Thanks dwarfthrower
I understand linking email to an img but I am using an ImageButton and it does not seem to want to work.
Here is my code
<td><a href ="mailto:myemail@mydomain.com"><asp:ImageButton ID="ImgButton2" ToolTip="Email" runat="server" Width="48" Height="48" ImageUrl="~/App_Themes/CQT/images/Envelope.png" /></a></td>
Any ideas?
 
Question concerning the html rendering of ASP.NET control ImageButton should better be answered in the forum855. If you give us the actual html that your control generates, we might be able to assist you better here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top