ASP.NET - control/change anchor control hover property in code behind c#

Asked By anbu n on 01-Aug-12 09:54 AM
how to control/change anchor control hover property in code behind c# , as per specific condition
Peter Bromberg replied to anbu n on 01-Aug-12 12:50 PM
A control's "hover" property is a CSS property in the client-side browser. So if you wanted to change this via codebehind (server side) you would need to add the proper CSS style declaration. For example:

MyHoverControl.Attributes.Add( "style","hover{background-color:yellow;}");