Solved

asp.net syntax send hyperlink in email

Posted on 2010-09-08
4
372 Views
Last Modified: 2012-05-10
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
Comment
Question by:bergertime
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
Ashok_Paulose earned 500 total points
ID: 33630854
message.Body = "New Email " + "<A href='http://www.mail.com/test.apsx?Name=" + textbox1.text & "'>Click Me</A>"
0
 
LVL 2

Expert Comment

by:junimation
ID: 33631240
make sure that you are using this property as well.
message.IsBodyHtml = true;

and then

message.Body = "New Email " + "Click Me";
0
 
LVL 2

Expert Comment

by:junimation
ID: 33631254
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
 
LVL 2

Author Closing Comment

by:bergertime
ID: 33631391
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question