I am using "@Html.ActionLink()" and used "text-decoration:none" in it. But still the link is showing underline for it.
Can anybody suggest solution for it to remove the underline.
Thanks, Yuoraj
答案 0 :(得分:0)
You can do it inline like this:
@Html.ActionLink(<your params>, new { style="text-decoration:none"})
but really you should be using a css file and a class:
@Html.ActionLink(<your params>, new { @class="myclass"})
where myclass looks like
a.myclass {
text-decoration: none;
}
UPDATE:
a.hprLnkmastercls {
text-decoration: none;
}
And if you don't want it underlined on hover
a.hprLnkmastercls:hover {
text-decoration: none;
}
In your .cshtml
@Html.ActionLink("Process", "Home" "WebsiteHome", new {}, new { @class = "hprLnkmastercls" })
will render as:
<a class="hprLnkmastercls" href="/WebsiteHome/Home">Process</a>