pass multiple query string using HyperLinkField in Gridview
Posted by Sujit Kumar on November 1, 2008
You can pass single/multiple query string using HyperLInkField
Pass data field name in DataNavigateUrlFields which you wnat to pass value in query string
ex:
DataNavigateUrlFields=”subject,query”
here subject and query both are differenct data field those are comming from database.
and write the page name in DataNavigateUrlFormatString where you want to pass query string value.
ex:
DataNavigateUrlFormatString = “~/Pages/default.aspx?UserName={0}&GameTitle={1}”
asp:HyperLinkField HeaderText=”View Details” DataNavigateUrlFields=”subject,query” DataNavigateUrlFormatString = “~/Pages/default.aspx?UserName={0}&GameTitle={1}” Text=”View”
Quinn said
This was helpful, thanks! Unfortunately my other query string is not a data field, but rather from a drop down list elsewhere on the page. Not sure the best way to handle that.