在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" />