asp.net - How to encode the plus (+) symbol in URL -
The URL links below will open a new Google Mail window. The problem I have is that Google replaces all plus + (+) signatures of the email body with spaces, it seems that it only happens with + sign, how to suggest a solution for this solution? (I am working on ASP.NET web page)
topic and body = hi there + hello there
(in the body email, "hi there + hello there "Will appear in the Here's an example of how you can make the URL in the net You can: + character in a special url = meaning; = it means white space. If you want to use
+ , you can enter it in the URL Will have to be changed in:
body = hi + there% 2bHello +
class program {static void main () {var uriBuilder = new UriBuilder ("https://mail.google .com / mail"); Var values = HttpUtility Value ["view"] = "cm"; value ["TF"] = "0"; value ["" from "] =" someemail@somedomain.com "; value [" su " ] = "Some topic"; value ["body"] = "hello there + hello there"; UriBuilder.xml = values.ToString (); var url = uriBuilder.ToString (); Console.WriteLine (url);}}
Comments
Post a Comment