I'm using HttpUtility.UrlEncode to turn parameter value which concluds '+' to safe string deliverd among pages, so it turns '+' into %2b, but when I use Decode method it give me back a space. Why?
相关问题
- Views base64 encoded blob in HTML with PHP
- Angular RxJS mergeMap types
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
Decoding
%2b
would give you back a+
, but decoding a+
would give you back a space.So, most likely your string is decoded twice. If you are reading it from the
Request.Querystring
collection, then it's already decoded, so you shouldn't decode it again.Weird, the following prints
+
on my console (as expected):