<input type="search" name="txtValue" id="txtValue" value="@Session["searched"]" placeholder="Need Service ? >
public class Alert { private const string EmailFrom = "XXX@gmail.com"; public static void SendConfirmationEmailAlert(string alert_text_box) { using (var client = new SmtpClient()) { using (var message = new MailMessage(EmailFrom, alert_text_box)) { message.Subject = "Please Verify Your Account"; message.Body = "<html><head><meta content=\"text/html; charset=utf-8\" /></head><body><p>Dear " + alert_text_box + ", </p><p>Thankyou for Alert </p>" + "</a></p><div>Best regards,</div><div>Jajin</div><p>Do not forward " + "this email. The verify link is private.</p></body></html>"; message.IsBodyHtml = true; client.EnableSsl = true; client.Send(message); }; }; } }
//If the values are in the cookie, then you can just write the cookie value to a string and plug it in. The session itself cannot be sent as it will be encrypted, but you can send the value(s) that it contains as shown below. string cookieValue = Session["searched"]).ToString(); message.Body = "Dear " + cookieValue + ". Thankyou for Alert<br /><br />Best regards, Jalin<br /><br />Do not forward this email. the verify link is private.";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)