How can I change the color of a dynamically created link button to mouse cursor focus using JavaScript?

code:

LinkButton linkButton = new LinkButton();
linkButton.OnClientClick="changecolor";--i need to change this to on mouse focus event 

      

There is no property for the link button like we have for onClientClick

.

0


a source to share


2 answers


linkButton.Attributes.Add("onmouseover", "yourChangeColorFunction();");

      



+3


a source


You can define a CSS class for a link button, which will have a different color on hover.



a
{
  color:black;
}
a.hover
{
  color:blue;
}

      

+2


a source







All Articles