-1

Possible Duplicate:
How do I replace all the spaces with %20 in C#

I'm looking for a url encoding method in C#. I know Server.UrlEncode but I think that encodes spaces as a + symbol. I think I remember one that does spaces as %20 but cannot remember what it is. Does any one know or am I getting this confused with something else?

Community
  • 1
  • 1
slimsam86
  • 1
  • 2

1 Answers1

1

Use HttpServerUtility.UrlEncode Method (String)...URL-encodes a string and returns the encoded string.

System.Web.HttpUtility.UrlEncode(string url)