How to bind a not visible value to Hyperlink URL in Gridview
I have a Hyperlink on one column in my gridview. Lets say this column has
different fruits..
Fruits Amount
Apple 2
Banana 1
Kiwi 4
Orange 5
My fruits should be Hyperlink and when i hover or click on the link i want
to send the id's from the fruit to next page and not the Fruitnames.
How can i do that? I only manage to make links to next page where the
names from fruits Comes as Parameter and i dont want that. I also dont
want to make a select on the id's from the fruit because then it Comes as
a new column in my gridview and it's not interesting to see the id's of
the fruits but it important to send them as Parameters because i Need them
on next page.
<asp:HyperLinkField DataNavigateUrlFields="FruitName"
DataTextField="FruitName" HeaderText="Fruits"
DataNavigateUrlFormatString="Cashier.aspx?FruitID={0}" />
No comments:
Post a Comment