【发布时间】:2010-11-29 11:48:52
【问题描述】:
我正在使用 VB.NET 构建一个 ASP.NET MVC 应用程序,并且我正在尝试使用代码将 css 类应用于 Html.ActionLink :
<%=Html.ActionLink("Home", "Index", "Home", new {@class = "tab" })%>
但是当我运行代码时,我收到以下错误:
编译器错误消息:BC30988: Type or 'With' expected.
我是 MVC 的新手,我真的不知道我在做什么,所以我看不出那里有什么问题,因为我正在使用基于其他地方示例的代码.
【问题讨论】:
-
Html.ActionLink 方法没有这样的签名(字符串,字符串,字符串,对象)。
-
有没有办法做到这一点不使用匿名类?
标签: css asp.net-mvc vb.net html-helper