суббота, 17 ноября 2012 г.

Html.ActionLink as Image


Late response but you could just keep it simple and apply a CSS class to the htmlAttributes object.
<%= Html.ActionLink("Button Name", "Index", null, new { @class="classname" }) %>
and then create a class in your stylesheet
a.classname
{
    background: url(../Images/image.gif) no-repeat top left;
     display: block;
     width: 150px;
     height: 150px;
     text-indent: -9999px; /* hides the link text */
}

Комментариев нет: