在gridview中使用超链接列项 [英] using hyperlink column item in gridview
本文介绍了在gridview中使用超链接列项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请告诉我解决方法:
i想在gridview中的列项上使用链接。该列项中的数据是从数据库中检索出来的,每当我点击特定的列项时,它都会导航到其特定的url页面,列中的每个项目都应导航到其不同的页面。
plz tell me the solution for this:
i want to use link on the column item in gridview .the data in that column item is retreived from database and whenever i clicked on particular column item it will navigate to its particular url page and every item in column should navigate to its different pages.
推荐答案
尝试这样的事情:
Try something like this:
<asp:hyperlink xmlns:asp="#unknown">
ID="HyperLink2"
runat="server"
Font-Bold="True"
ForeColor="Red"
Text='<%# Eval("Title", "{0}") %>'
NavigateUrl='<%# "~/Default.aspx?id=" & Container.DataItem("TitleID") %>'
Width="306px">
</asp:hyperlink>
Also check out similar threads here[^] & here[^]
结帐此链接
如何在ASP.NET中的gridview中添加超链接 [ ^ ]
请点击以下链接:
http://www.aspdotnet-suresh.com/2013/01/convert-gridview-column-into-hyperlink.html [ ^ ]
这篇关于在gridview中使用超链接列项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文