0

我有一个像 http%3A%2F%2Fwww%2Ewikimoveis%2Ecom%2Ebr%2Ffotos%2F1292%2FKO2551%2FDSC01366%2EJPG 这样的网址

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

谢谢你

4

1 回答 1

6

C# URLDecode 将 %5C 变成 \\\\ 而不是 \

using System;
using System.Web;

string url = "http%3A2F%2Fwww%2Ewikimoveis%2Ecom%2Ebr%2Ffotos%2F1292%2FKO2551%2FDSC01366%2EJPG"
string decoded = HttpUtility.UrlDecode(url);
于 2010-07-28T13:21:27.870 回答