如果访问的地址是:

http://hovertree.com/guestbook/addmessage.aspx?key=hovertree%3C&n=myslider#zonemenu

那么

Request.Url.ToString() 的值是:
http://hovertree.com/guestbook/addmessage.aspx?key=hovertree<&n=myslider 

Request.RawUrl.ToString() 的值是:
/guestbook/addmessage.aspx?key=hovertree%3C&n=myslider

我们可以看出

Request.RawUrl 不包含主机名及前面的内容。

Request.RawUrl 完整地体现地址栏的 QueryString,

而 Request.Url 会进行 Server.URLDecode 解析。

而且两个的相同地方是,都不包含#以及后面的字符串

 查看留言:http://hovertree.com/guestbook/

转自:http://keleyi.com/a/bjae/avh3bdvq.htm

技术文章:http://www.cnblogs.com/sosoft/p/kaifajishu.html

相关文章:

  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-08-26
  • 2021-07-04
  • 2021-12-26
猜你喜欢
  • 2021-08-02
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案