HyperLinkField CssClass not working

D

Dan

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 <td> tag. I need to have the style applied to the
hyperlink. Any thoughts on why I do not see code when I set the controlStyle?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top