在GridView中使用超链接 [英] use of hyperlink in gridview
本文介绍了在GridView中使用超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能告诉我如何使用asp.net中的超链接.
我有一些类别..然后单击类别,页面将显示该类别中的产品..
我想不使用asp.net buildin datasource
can anyone tell me how to use the hyperlinks in asp.net.
i have some catagories.. and on clicking the catagory the page wil show the products in that catagory..
i want to do it without using asp.net buildin datasource
推荐答案
如果不使用GridView,则必须使用某种数据源.搜索主/详细信息,您将找到很多示例
If you are using a GridView you must use a datasource of some kind. Search for master/detail and you will find plenty of examples
要与gridview绑定的数据源是什么?您可以使用GridViewHyperlink字段或Template字段在gridview中显示超链接.
What data source you are binding with your gridview ? You can either use GridViewHyperlink field or Template Field for showing the hyperlink with in gridview.
使用此标记
< asp:HyperLinkField Text ="View" DataNavigateUrlFormatString ="custeomer.aspx?customerid = {0}" DataNavigateUrlFields ="customerid"/>
used this tag
<asp:HyperLinkField Text="View" DataNavigateUrlFormatString="custeomer.aspx?customerid={0}" DataNavigateUrlFields="customerid" />
这篇关于在GridView中使用超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文