HttpUtility.HtmlDe code不解码空间?空间、HttpUtility、HtmlDe、code

2023-09-03 06:35:48 作者:慢慢淡忘忧蓝·似残梦

我有这样的

 string test =  HttpUtility.HtmlDecode("http://test.com/Folder1/Folder2/my%20view.aspx");

当我看着测试仍然有20%,而不是一个空间。为什么不解码呢?

When I look into test it still has %20 instead of a space. Why is it not decoding this?

推荐答案

您正在寻找 HttpUtility.UrlDe code()(在System.Web命名空间,我认为)

You are looking for HttpUtility.UrlDecode() (in the System.Web namespace, I think)