I have a webservice which is passed some encoded material.
Javascript:
var x = encodeURIComponent(data);
But when X is sent to the server, I am unable to decode it. I was looking through the namespaces HTTP, and URI, but was having trouble finding the exact thing I wanted as I tried HttpUtility.HtmlDecode() and Uri.EscapeUriString() to no avail.
How is this done?
Try HttpUtility.UrlDecode() instead of HttpUtility.HtmlDecode().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With