Click here to Skip to main content
13,093,097 members (64,791 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi guys,
I have a custom grid on which i have binded data in my c# code behind. I have given a hyperlink field to one of my column. If i click the hyperlink value, it should navigate to the details page of that hyperlink value. The code is given below,
protected void grd_RowDataBound(object sender, GridViewRowEventArgs e)
        if (e.Row.RowType == DataControlRowType.DataRow)
            HyperLink myLink = new HyperLink();
            myLink.Text = e.Row.Cells[2].Text;
            myLink.NavigateUrl = "Estimation.aspx?EstimateID=" + EstimateID + "&VersionNo=" + VersionNo;

If i click the link, the page is getting navigated, but i am not getting the details which are already pre-loaded in that page. Please give me suggestions on how to incorporate this. Thanks
Posted 31-Jan-13 19:13pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

use like this in aspx page

<asp:linkbutton id="lnkid" text="<%# Eval("text") %>" runat="server" postbackurl="<%# Eval("EstimateID","~/Estimation.aspx?EstimateID={0}& VersionNo={0}") %>'></asp:linkbutton>

if problem solved then mark it as accept colution
Anusha Sridhar 1-Feb-13 1:51am
i am using a custom grid and i am performing this functionality in code behind. So its not working here.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2017
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