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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -