mardi 4 août 2015

Add OnHover style programmatically to a link button in an extended control class

I'm extending the GridView control to add a custom Pager. I have added a few link buttons in my Pager and I need to change the color of the link buttons on hover.

I've seen several examples online but all have to include the actual CSS class in the aspx page and just reference it from the code behind. My situation is different between I only got a .cs file and I don't want to manually add classes to the aspx page.

This is the CSS I need to apply to my LinkButton "lnkBtnFirst"

btn-link:hover{
  color: #2a6496;
}

Aucun commentaire:

Enregistrer un commentaire