What exactly is the difference between the 2 , the output seems similar except the Uri.EscapeUriString encodes spaces to %20 and Server.UrlEncode encodes them as a + sign.
And the final question which should be used preferably
What exactly is the difference between the 2 , the output seems similar except the Uri.EscapeUriString encodes spaces to %20 and Server.UrlEncode encodes them as a + sign.
And the final question which should be used preferably
Here is a blog post about this: http://blog.nerdbank.net/2009/05/uriescapedatapath-and.html
Hope it helps!