Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am sending email through code which contains Page URL.
the code returns proper URL text and href value. but in the email I am getting double dots between login and aspx like (login..aspx) or sometimes(PageName ..aspx), but as you can see it is hardcoded in the text. pageName doesnot contain . init.
any help


<pre lang="c#">
RedUrl = "<a href='" + domain + "/login.aspx?redurl=" + PageName + ".aspx&id=" + id.EncodeString()'>" + domain + "/login.aspx?redurl=" + PageName + ".aspx&id=" + id.EncodeString() "</a>";
Posted
Updated 9-Sep-12 22:29pm
v2
Comments
AmitGajjar 10-Sep-12 5:13am    
Are you sure, this code is executed to generate URL in your email ?

I thing you need to use encoding
example i have an issue in my email body where one of link automatically double dot appear, so i use below code
C#
mailMessage.BodyEncoding=System.Text.Encoding.UTF8
 
Share this answer
 
v2
from where r u getting pagename and check if pagename has . in it
 
Share this answer
 
Comments
Dexter11 10-Sep-12 4:37am    
no page name doesnot contain dot. i am getting login..aspx (any reason for that)

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