GridView 中的超链接
我设置了一个包含有关住宿信息的网格视图。每行都有一个链接以查看更多信息。该页面上会显示有关该住宿的信息,并带有一个进一步的链接,可用于根据该住宿 ID 查看评论。当查看这些评论时,我希望有一种方法可以返回到所查看的住宿,而无需单击浏览器上的后退按钮。
所以基本上我需要一个超链接,它可以从显示的 url 或详细信息视图中查看住宿 ID,然后转到类似此类链接的链接,其中 ID 根据您查看的住宿而变化:
http://localhost:9000/WebSite1/comments.aspx?Accom_ID=1001
有什么想法吗?
更新:感谢您的回复,但我希望在页面底部有一个链接,而不是在网格视图的每一行上。另外,页面会根据显示的内容而变化,因此我不能只添加指向 ...accom_id=1001 的超链接,因为有时它是另一个 ID。
I have a gridview set up that contains information about accommodation. Each row then has a link to view more information. On that page information about that accommodation is displayed with a further link to view comments based on the accommodationid. When viewing those comments I want a way to go back to the accommodation viewed without just clicking the back button on the browser.
So basically I need a hyperlink that looks at the accommodation ID wither from the url or the detailsview shown and goes to something like this sort of link where the ID changes depending on what accommodation your viewing:
http://localhost:9000/WebSite1/comments.aspx?Accom_ID=1001
Any ideas how?
Update: Thanks for the responses but I want a link at the bottom of the page not on each row of the gridview. Also the page changes based on what is show so I cant just put a hyperlink to ...accom_id=1001 as sometimes its another ID.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
和
and
如果您位于
/WebSite1/comments.aspx?Accom_ID=1001
页面,则只需将超链接 URL 设置为/WebSite1/accomodation.aspx?Accom_ID=1001
如下应设置 NavigateURL:
If you are on page
/WebSite1/comments.aspx?Accom_ID=1001
, then just set the hyperlink URL to/WebSite1/accomodation.aspx?Accom_ID=1001
This is how the NavigateURL should be set: