Good morning all,
I am currently trying to send an email after a user fills in a form. The email contains a link to an activation page. My code for generating the link is as follows:
mailMessage.Body = "<h1>Please click the link below to activate your account</h1><br /><a href = '" + HttpContext.Current.Request.Url.AbsoluteUri.Replace("Activation.aspx", "Activation.aspx?userId=" + userId) + "'>Click here to activate your account.</a>";
However the url the email shows when sent is:
http://localhost:52621/RegisterUser.aspx
What am I doing wrong? As shown in the code that generates the link I am trying to get to a page by the name of Activation.aspx which is not happening. Any suggestions would be great. Thanks in advance.