Tuesday, March 24, 2009

HyperLinkField not showing as link (ASP.NET)

After binding data to a HyperLinkField in a GridView it didn't show as link but as a normal text. Apparently when using navigation by data fields, the data in the fields set in DataNavigateUrlFields must be validated.

See some more information here:

I had a problem when the field was a DateTime field returned by a database query. I've change the field format in the following way to make this work (navigation):
[Date] = convert(VARCHAR, [Date],104)

No comments: