Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How would I go abouce decodeURI with c#/asp.net

Tags:

c#

uri

asp.net

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?

like image 890
Fallenreaper Avatar asked Aug 24 '12 13:08

Fallenreaper


1 Answers

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

like image 161
Emir Akaydın Avatar answered Oct 09 '22 07:10

Emir Akaydın