我正在构建一个ASP.NET MVC应用程序,使用VB.NET,我正在尝试将css类应用于Html.ActionLink使用代码:
<%=Html.ActionLink("Home", "Index", "Home", new {@class = "tab" })%>
Run Code Online (Sandbox Code Playgroud)
但是当我运行代码时,我收到以下错误:
编译器错误消息:BC30988:输入或"With"预期.
我是MVC的新手,并且真的没有太多线索我正在做什么,所以我看不出有什么问题,因为我在其他地方使用基于代码的代码.
如何将css类添加到此actionlink?我已经读过你这样做new { class = button }但我不知道把它放在我的actionlink中:
<%= Html.ActionLink("View Performances", "Details", "Productions",
new { name = item.show , year = item.year }, null) %>
Run Code Online (Sandbox Code Playgroud)