Have you tried HttpUtility.UrlDecode ?
See here .
Please note that this function does not do the same as HttpUtility.HtmlDecode .
Edit: in response to a question about the differences between UrlDecode and UnescapeDataString :
To quote the MSDN page in UnescapeDataString :
Many web browsers skip spaces within the URI in plus signs ("+"); however, the UnescapeDataString method does not convert plus characters to spaces, because this behavior is not standard for all URI schemes.
UrlDecode handles them, but you get different answers if you try the following:
string a = Uri.UnescapeDataString(".Net+Framework"); //returns ".Net+Framework" string b = HttpUtility.UrlDecode(".Net+Framework"); //returns ".Net Framework"
Therefore, it would seem that for better coverage, HttpUtility.UrlDecode is the best option.
Jon egerton
source share