Hex Url解码器c#

时间:2010-07-28 13:18:40

标签: c# url-encoding

我的网址如http%3A%2F%2Fwww%2Ewikimoveis%2Ecom%2Ebr%2Ffotos%2F1292%2FKO2551%2FDSC01366%2EJPG

我需要让它正确解码。我相信这是十六进制的。找不到任何可以做到的C#代码。

谢谢

1 个答案:

答案 0 :(得分:6)

来自C# URLDecode turns %5C into \\\\ instead of \

using System;
using System.Web;

string url = "http%3A2F%2Fwww%2Ewikimoveis%2Ecom%2Ebr%2Ffotos%2F1292%2FKO2551%2FDSC01366%2EJPG"
string decoded = HttpUtility.UrlDecode(url);