If I have en extension like that :
public static string ImageLink(this HtmlHelper htmlHelper,
string imgSrc,
Have it return MvcHtmlString
instead (my sample below).
public static MvcHtmlString IconImg(this HtmlHelper htmlHelper, string icon, string title = "", string size = "16x16") {
string path = VirtualPathUtility.ToAbsolute("~/res/img/icons/" + size + "/" + icon + ".png");
string imgHtml = "";
return new MvcHtmlString(imgHtml);
}