Respostas:
Server.UrlDecode(xxxxxxxx)
System.Web.HttpServerUtilityBase, mas isso já deve ser importado no ASP.NET MVC.
string decodedUrl = Uri.UnescapeDataString(url)
ou
string decodedUrl = HttpUtility.UrlDecode(url)
O URL não é totalmente decodificado com uma chamada. Para decodificar completamente, você pode chamar um destes métodos em um loop:
private static string DecodeUrlString(string url) {
string newUrl;
while ((newUrl = Uri.UnescapeDataString(url)) != url)
url = newUrl;
return newUrl;
}
Uri.UnescapeDataStringduas vezes e consegui o que queria !! : D
Você já tentou HttpServerUtility.UrlDecodeou HttpUtility.UrlDecode?
HttpServerUtility.UrlDecodeque é um método de instância, deve-se usar HttpContext.Current.Server.UrlDecode.
Experimentar:
var myUrl = "my.aspx?val=%2Fxyz2F";
var decodeUrl = System.Uri.UnescapeDataString(myUrl);