I am looking for the best solution for my problem. I am currently using a asp.net gridview with a link in the first column and the id to the item it relates too.
Details href=…/page.aspx?ID=25
I have 3 hidden fields that I would like to bring with me to the next page.
I want the url to look something like this. Details href=…/page.aspx?ID=25&HDN1=3&HDN2=5&HDN3=76
I am able to set the values of the hidden text. I need to retrieve the values and add them to the url in the Details link.(onclick?). What is the best way to get this done??
If these hidden fields are part of the databinding source collection then you can pass multiple parameters to a HyperLinkField GridView column. eg:
Edit:
OK if it’s client side, then you will have to do this via javascript.
I would add an onclick handler to each of your links:
then a javascript function to handle the redirect: