如何在此actionlink中添加css类?我已经读过你这样的事情new { class = button }
但是我不确定把它放在我的动作链接中:
<%= Html.ActionLink("View Performances", "Details", "Productions",
new { name = item.show , year = item.year }, null) %>
答案 0 :(得分:82)
你可以尝试
<%= Html.ActionLink("View Performances", "Details", "Productions",
new { name = item.show , year = item.year },
new {@class = "button"}) %>