How would I go abouce decodeURI from C # / asp.net

I have a web service that has been sent some encoded material.

JavaScript:

var x = encodeURIComponent(data); 

But when X sent to the server, I cannot decode it. I was looking at HTTP namespaces and URIs, but I could not find what I wanted, since I tried HttpUtility.HtmlDecode() and Uri.EscapeUriString() no avail.

How it's done?

+6
source share
1 answer

Try HttpUtility.UrlDecode() instead of HttpUtility.HtmlDecode() .

+13
source

Source: https://habr.com/ru/post/923671/


All Articles