Possible Duplicate:
Razor syntax prevent escaping html in an action link
How can I generate link, which contains image, using ASP.NET MVC Razor view engine @Html.ActionLink() method. This method takes inner link text as first parameter, so I tried:
@{
string linkInnerHtml = string.Format("<img src=\"{0}\" /> Tiles", MyClass.GetImgSrc());
}
@Html.ActionLink(linkInnerHtml, "action" ... )
but, as a result, I got link with <img src="/source.img" /> Tiles inner text. HTML didn’t render.
Write it out longhand, using
Url.Actionto render thehrefattribute value.