c# - ASP.NET MVC add class and image to an anchor element -
this question has answer here:
i have anchor element image inside , use @html.actionlink asp.net mvc create it:
<a class="element image-button image-left place-left" style="color: #3d1400"> text here <img src="~/content/images/logo.png" /> </a>
can me it? thanks
using actionlink 1 can following in view
@html.actionlink("view details", "detail", new { @class = "detailsicon"})
and in style sheet can define like
.detailsicon { background: url(animage.png); }
Comments
Post a Comment