Connecting Tech Pros Worldwide Help | Site Map

HyperLinkField CssClass not working

=?Utf-8?B?RGFu?=
Guest
 
Posts: n/a
#1: Aug 11 '08
I am creating the content for my Gridview through code. My last column is a
hyperlinkfield. Everything is working fine except for applying my CssClass
to the HyperLinkField. I have tried the following:

hyperlinkfield.ControlStyle.CssClass = "MyClass"

However, this generates no html output to the page and the style is not
applied. If I set the code using the ItemStyle instead of controlStyle, it
gets applied to the <tdtag. I need to have the style applied to the
hyperlink. Any thoughts on why I do not see code when I set the controlStyle?
Closed Thread


Similar ASP / Active Server Pages bytes