LinkButton permanent underline
I'm using an asp:LinkButton. The text underlines upon hovering over it. However I want it to always have an underline. Can anyone tell me how to achieve this?
Than开发者_C百科ks!
Try setting LinkButton.CssClass to "underlinedLinkButton", then add this to your CSS file.
.underlinedLinkButton { text-decoration:underline; }
I got it to work by setting the Font-Underline="True"
attribute like so:
<asp:LinkButton runat="server" ID="_MyLinkButton" Font-Underline="True"
Text="X" OnClick="MyLBClick" />
精彩评论