HTML button on an email page

I was wondering if it is possible to put a html button on an email page that would when clicked send you to a website: [noparse]www.mysite.com[/noparse].

msg.[To].Add(email1)
msg.Subject = "Welcome Session Member"
msg.From = fromAdd
msg.IsBodyHtml = True
msg.Priority = MailPriority.Normal
msg.BodyEncoding = Encoding.Default
msg.body="<input id="Button1" type="button" value="Website" onclick=somefunction("www.mysite.com") />"

or something like this…

Your question isn’t all that clear. Are just just trying to place a link in an email?

I don’t think I would trust all email clients to handle form submits or javascript as a web page would.

You can put links though. So I suppose you could link around an image of a button.

But if the user is taken out of their email window unexpectedly they might get a bit miffed.

I think the question is: a link with the appearance of a button, like a submit button in a html page.

The type=“button” of a html element is for use in a html-browser. But not all email visitors use “browser-mail” (as Google-mail), some use e-mail programs (like Outlook, Thunderbird). E-mail programs aren’t browsers, and have a bad html support.

Often the e-mail client doesn’t show images, so I think an image-button is not reliable.

You can try a “[U]Bulletproof Email Button[/U]", or the "[URL=“http://www.industrydive.com/blog/how-to-make-html-email-buttons-that-rock/”][U]How to make HTML email buttons that rock[/U]”, which has the same principle: an old-fashioned table model with a styled link in a cell.

If you follow them with a more html button-like design, you’ll get something like this:

Excellent point about email clients and images. Mine only initially blocks images for emails not in my whitelist, but there’s no accounting for others.

I like the CSS solution a lot. Do you know if the email client doesn’t support “border-radius” if it would show OK except without the “rounded corners”?

I don’t know for sure what e-mail clients are doing, but the css rule is that if something is not supported, it will be denied (just like an error).
So I should trust that the fall back is rectangle corners.
But a live check is never for nothing. :slight_smile: