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 + 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 +   

Here's an example of how you can make the URL in the net You can:

  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

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -