I have the following code:
try
{
MailMessage mmSendEmail = new MailMessage();
mmSendEmail.To.Add("[email protected]");
mmSendEmail.From = new MailAddress("[email protected]");
mmSendEmail.Subject = "Task#: " + s; //'s' is a query string from the URL of the page
mmSendEmail.Body = "task ID: " + s + ".<br /><br /> <a href='http://mypage.com/page.aspx?ID='" + s +"' title='override'>task</a>";
mmSendEmail.IsBodyHtml = true;
SmtpClient scSend = new SmtpClient("mymailserverip");
scSend.Send(mmSendEmail);
}
I receive the following email from the above code:
Subject: Task #: 0908090
Body: task ID: 0908090 <a href="http://mypage.com/page.aspx?ID=">task</a>
How come the ID is missing from the link but shows up in other place.
Try String Format for that: