HyperLinkField
Posted by elberon5 Fri, 28 Sep 2007 13:40:00 GMT
Ok. I wish I had found this HyperLinkField bound field type a long time ago. This is the perfect field type for making links in a gridview when you need to include fields in the querystring of the URL. I wont get into the hacks i've attempt to get around this one.
Basically there's two important properties of it.
DataNavigateUrlFields - This can be a comma separated list of the fields from the GridView's table that you want to send into the Url.
DataNavigateUrlFormatString - This is the URL. It works like String.Format() where you put in the placeholders for the fields from DataNavigateUrlFields to go into.
E.g. "myurl.aspx?id={0}&id2={1}"
