This is a nice thing and expected attribute often. This time we have to take the help of Cascading Style sheet. Here we should follow 2 steps:
1. define a class in css file
2. apply the class to the control
Lets discuss:
1.class hyp in css file:
.hyp
{
font-weight:bold;
display:run-in;
text-decoration:none;
cursor:pointer;
}
Here text-decoration is set to none therefore underline will not be shown.
2. using class to the control:
<asp:HyperLink ID="mylink" runat="server" CssClass="hyp" NavigateUrl="mypage.aspx">
Go to my page
</asp:HyperLink>
Here we see that css class is set to the control but one thing must be done while using the css class. Css file must be linked to the page in head section. Here is that code
<link href="default.css" type="text/css" rel="Stylesheet"/>
I think this will be helpful.
thanks.
Masud (15.7.9)
No comments:
Post a Comment