HttpUtility.HtmlDecode not decoding spaces?

前端 未结 2 1900
广开言路
广开言路 2021-02-13 10:52

I have this

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

When I look into test it still has %20

相关标签:
2条回答
  • 2021-02-13 11:38

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

    0 讨论(0)
  • 2021-02-13 11:45

    HttpUtility.HtmlDecode not decoding "%20", use HttpUtility.UrlDecode to decode "%20"

    0 讨论(0)
提交回复
热议问题