Adding images within Html.ActionLink

前端 未结 4 2278
攒了一身酷
攒了一身酷 2021-02-18 21:02

I was trying to create an option to switch between a list view and widget view in ASP.net MVC (with razor view engine).

However, I am having some trouble trying to both

4条回答
  •  野性不改
    2021-02-18 21:25

    Try this:

    Html.ActionLink(" ", "Edit", new {id = c.ID}, new { @style = "background:url('../../Images/Menu/edit.png') no-repeat center right; display:block; height: 30px; width: 50px" }
    

提交回复
热议问题