How do I apply a CSS class to Html.ActionLink in ASP.NET MVC?

前端 未结 7 710
借酒劲吻你
借酒劲吻你 2020-12-01 06:02

I\'m building an ASP.NET MVC application, using VB.NET and I\'m trying to apply a css class to a Html.ActionLink using the code:



        
7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 06:17

    This syntax worked for me in MVC 3 with Razor:

    @Html.ActionLink("Delete", "DeleteList", "List", new { ID = item.ID, ListID = item.id }, new {@class= "delete"})
    

提交回复
热议问题