HyperLinkField CssClass not working

Discussion in 'ASP General' started by Dan, Aug 11, 2008.

  1. Dan

    Dan Guest

    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?
     
    Dan, Aug 11, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Max
    Replies:
    1
    Views:
    2,022
  2. Bruno Alexandre

    HyperLinkField Help

    Bruno Alexandre, Dec 1, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,458
    Michael Tkachev
    Dec 6, 2004
  3. Carlos
    Replies:
    0
    Views:
    374
    Carlos
    Aug 26, 2009
  4. JB
    Replies:
    2
    Views:
    3,152
    Phil Harvey
    Oct 3, 2009
  5. Dales

    CssClass property not working

    Dales, Nov 19, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    179
    Dales
    Nov 19, 2003
Loading...

Share This Page