Click here to Skip to main content
15,898,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How i can send URl of my current page as part of email for example if i have a textbox and a button. if i enter an email address in textbox and click the button a mail should be send like you visited page "ault.aspx">http://localhost:7864/WebSite1/Default.aspx[^]"
Posted

1 solution

u can send url using below code

string sPath = System.Web.HttpContext.Current.Request.RawUrl;


then in your email code u send this string in msg body like below

here msg is
MailMessage msg = new MailMessage();


msg.Body = "You visited the page"+ sPath;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900