• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

asp.net syntax send hyperlink in email

message.Body = "New Email " + "<A href=""http://www.mail.com/test.apsx?Name="" + textbox1.textl>Click Me</A>"

I'm sending an email with net.mail.  what is the correct syntax for passing the querystring?
0
bergertime
Asked:
bergertime
  • 2
1 Solution
 
Ashok_PauloseCommented:
message.Body = "New Email " + "<A href='http://www.mail.com/test.apsx?Name=" + textbox1.text & "'>Click Me</A>"
0
 
junimationCommented:
make sure that you are using this property as well.
message.IsBodyHtml = true;

and then

message.Body = "New Email " + "Click Me";
0
 
junimationCommented:
sorry here is the correct way

make sure that you are using this property as well.
message.IsBodyHtml = true;

and then
message.Body = "New Email " + "<A href=\"http://www.mail.com/test.apsx?Name=\"" + "whatever text" + "\">Click Me</A>";

Open in new window

0
 
bergertimeAuthor Commented:
Ashok, I must confess your code didn't look right.  I didn't think the textbox1 would get picked up inside the single quotes.  Anyways thanks.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now