Hi,
I've coded the following, which correctly displays the "name" field from my datasource in the GridView column but does not show it as a hyperlink. I want to be able to click on the hyperlink and be redirected to the site identified in the "url" field. Has anyone any idea why this doesn't work?
Dim hyper As New HyperLinkField
hyper.DataTextField = "name"
hyper.Target = "_blank"
Dim str(0) As String
str(0) = "url"
hyper.DataNavigateUrlFields = str
hyper.DataNavigateUrlFormatString = "{0}"
hyper.ItemStyle.HorizontalAlign = HorizontalAlign.Center
hyper.HeaderText = "link"
Dim Col As DataControlField = hyper
GridView1.Columns.Add(Col)
Thanks in advance for any ideas you might have.
!--removed tag-->
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).