HttpContext.Current.Request.Url.ToString() 并不可靠。

如果当前URL为
http://localhost/search.aspx?user=http://csharp.xdowns.com&tag=%BC%BC%CA%F5

通过HttpContext.Current.Request.Url.ToString()获取到的却是

http://localhost/search.aspxuser=http://csharp.xdowns.com&tag=¼¼Êõ


正确的方法是:HttpContext.Current.Request.Url.PathAndQuery

相关文章:

  • 2021-11-05
  • 2022-01-26
  • 2022-02-15
  • 2021-06-18
  • 2022-02-02
  • 2022-12-23
  • 2021-05-19
猜你喜欢
  • 2022-02-04
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
相关资源
相似解决方案