Replace this:
<a href=""><b>Link</b></a>
FROM
@Html.ActionLink("<b>Link</b>", "Action", "Controller")
This can automatically encode <b></b> , so you can try:
@Html.ActionLink(new MvcHtmlString("<b>Link</b>").ToHtmlString(), "Action", "Controller")
Even simpler, you can use @Url.Action("Action", "Controller") in a link, for example:
<a href='@(Url.Action("Action", "Controller"))'><b>Link</b></a>
Brian mains
source share