Click here to Skip to main content
15,883,558 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear All,

gridview contain columns: id, image, title,location
rows: 5

once click first row title(computer)
this link go to computer.aspx

2nd row title(Accountant)
this link go to accountant.aspx

3rd row title(laptop)
this link go to laptop.aspx

4th row title(camera)
this link go to camera.aspx

5th row title(mobile)
this link go to mobile.aspx

this link navigation is possible or not

please reply me

possible : how

please reply me any logic or examples sites or url paths
Posted

 
Share this answer
 
v4
use Hyperlinkfield in Gridview


C#
<asp:gridview id="OrdersGridView"
        datasourceid="OrdersSqlDataSource"
        autogeneratecolumns="false"
        runat="server">

        <columns>

         
          <asp:hyperlinkfield datatextfield="Computer"
            datatextformatstring="{0:c}"
            datanavigateurlfields="ProductID"
            datanavigateurlformatstring="~\computer.aspx?"
            headertext="Price"
            target="_blank" />
       <asp:hyperlinkfield datatextfield="Accountant"
            datatextformatstring="{0:c}"
            datanavigateurlfields="ProductID"
            datanavigateurlformatstring="~\Accountant.aspx?"
            headertext="Price"
            target="_blank" />

        </columns>

      </asp:gridview>



Further Reference


Hyperlinkfield in Gridview
and
this
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900