How to pass multiple field values from a datagrid hyperlink?
-
:confused:I'm using a datagrid with a hyperlink column displaying each person's name as the link. When the name is clicked, I'd like to pass the name and other field values (i.e. SSN, phone), contained in the datagrid, as a query string. However, the DataNavigateUrlField only let's me enter one field value. Any ideas how I could pass more than one field value (as a query string) by clicking a hyperlink in a datagrid? Thanks all.
-
:confused:I'm using a datagrid with a hyperlink column displaying each person's name as the link. When the name is clicked, I'd like to pass the name and other field values (i.e. SSN, phone), contained in the datagrid, as a query string. However, the DataNavigateUrlField only let's me enter one field value. Any ideas how I could pass more than one field value (as a query string) by clicking a hyperlink in a datagrid? Thanks all.
I recently had this problem too when I was trying to pass two variables. I figured out a way, but since one of the variables was not dependant on the datagrid, I don't think it'll help you much, but here's the code i used:
Dim col As New HyperLinkColumn() col.DataNavigateUrlField = _your field_ col.DataNavigateUrlFormatString = Request.FilePath() & "?id={0}&proj=" & TextBox1.Text
Maybe this will give some idea? Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
Get your facts first, and then you can distort them as much as you please Mark Twain