Gee wiz, it was a pretty simple solution as soon as I looked at it again.
@{
// Note, the necessary absence of the "~" tilde in the src attribute below.
var img = "<img alt='microsoft homepage' src='/Content/Images/microsoft_logo.png'/>";
var url = "http://www.microsoft.com/";
}
@Html.Bootstrap().Link(@img, @url)
On a side note, would it be nice if BMCV had built-in ImageLink and ImageActionLink?
source
share