I want to present a button with @Html.ActionLink
but i need to have my application font in the text.
With this code:
@H
Here's mine. Inspired by Andrey Burykin
public static class BensHtmlHelpers
{
public static MvcHtmlString IconLink(this HtmlHelper htmlHelper, string linkText, string actionName, object routeValues, String iconName, object htmlAttributes = null)
{
var linkMarkup = htmlHelper.ActionLink(linkText, actionName, routeValues, htmlAttributes).ToHtmlString();
var iconMarkup = String.Format("", iconName);
return new MvcHtmlString(linkMarkup.Insert(linkMarkup.IndexOf(@""), iconMarkup));
}
}