Click here to Skip to main content
11,636,778 members (77,381 online)
Rate this: bad
Please Sign up or sign in to vote.
I want to add a column to gridview in ASP.NET, this column should contain Hyperlink and i want to navigate to a particular page with the clicked cell value to be passed using the get method.

How to do this in
I can make the element hyperlink, buut how to pass the selected value?

following is my aspx code

        <asp:CommandField HeaderText="" ShowEditButton="True" />
        <asp:TemplateField  HeaderText="Poject Name">
                <asp:HyperLink ID="PROJ_NAME" runat="server" DataNavigateUrlFields="PROJ_NAME" NavigateUrl='<%# "~/SummaryReport.aspx?name=" %>' 
                        Text='<%# Eval("PROJ_NAME") %>' ></asp:HyperLink>
                <asp:BoundField DataField="UPLOADED" HeaderText="Uploaded" ReadOnly="True" />
                <asp:BoundField DataField="EXPECTED_DATA" HeaderText="Expected Data" />
                <asp:BoundField DataField="CURRENT_DATA" HeaderText="Current Data" ReadOnly="True"/>
                <asp:BoundField DataField="COMPLETED" HeaderText="Completed" ReadOnly="True"/>

I am new to ASP.NET, any help will be appreciated.. thanks in advance..
Posted 31-Mar-13 6:07am
Avik B.363

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hi Avik,

I think the code will work with a little change.

Update NavigateUrl property :

NavigateUrl='<%# "~/SummaryReport.aspx?name={0}" %>'

For more information you follow below links:

Using Hyperlinks in GridView

Using Hyperlinks


Don't forget to mark useful responses as Answer if they helped you towards a solution.

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

  Print Answers RSS
0 263
1 stibee 249
2 Sergey Alexandrovich Kryukov 229
3 Suvendu Shekhar Giri 225
4 OriginalGriff 183
0 OriginalGriff 8,941
1 Sergey Alexandrovich Kryukov 8,493
2 Mika Wendelius 6,909
3 F-ES Sitecore 2,388
4 Suvendu Shekhar Giri 2,320

Advertise | Privacy | Mobile
Web01 | 2.8.150728.1 | Last Updated 31 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100