我有一个这样的网址:
http://localhost/place/663828/bangkok-paradise-restaurant-toronto#r306040
我试图查看是否存在锚标记以及获取其值以在后面的代码中执行一些代码逻辑。
我一直在尝试使用 Page.Request,但没有一个属性显示 URL 的锚链接部分。
例如:
Response.Write(this.Page.Request.RawUrl.ToString());
我几乎尝试了此页面上的组合/属性:http ://www.west-wind.com/weblog/posts/269.aspx
只是为了完成这个话题:
我用永久链接复制了 Stack Overflow 的方法...:D