开发者

ASP.NET MVC add css class to actionlink [duplicate]

This question already has answers here: How do I add a class to an @Html.ActionLink? (5 answers) Closed 7 years ago.

How do I add a css class to this actionlink? I have read you do it something like new { class = button } but I'm not sure where to put it within my actionlink:

<%= Html.ActionLink("View Performances", "Details", "Produc开发者_Python百科tions", 
                    new { name = item.show , year = item.year }, null) %>


you can try

<%= Html.ActionLink("View Performances", "Details", "Productions", 
        new { name = item.show , year = item.year }, 
        new {@class = "button"}) %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜