up vote 0 down vote favorite

Hey, I have a hyperlink column. I need to add just one query string to the url. It needs to pass the string located in the first column of the same row. Let me know if you need more info.

Thanks

Edit: Also, if you don't mind it might be useful if I was able to pass the primary key of the object bound to that row, instead of the string in the first column. Would that be tricky to do? Either would work fine.

link|flag

1 Answer

up vote 0 down vote accepted

Got it.

I added the code to the databind function for the grid.

HyperLink link = (HyperLink)e.Row.Cells[5].Controls[0];
                link.NavigateUrl = "~/viewDocuments.aspx?id=" + current.ID;
link|flag

Your Answer

get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.