【发布时间】:2008-12-13 17:39:40
【问题描述】:
每当我尝试使用 ActionLink 时都会出现上述错误?我才刚刚开始使用 MVC,并不太明白代码有什么问题(如下):
<%= Html.ActionLink("Lists", "Index", "Lists"); %>
这似乎只是一个解析问题,但它只在我运行页面时发生。应用程序构建得非常好,所以我真的不明白,因为错误是编译错误?如果我取出第 25 行,它将发生在下一行...
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1026: ) expected
Source Error:
Line 23: </div>
Line 24:
Line 25: <%= Html.ActionLink("Lists", "Index", "Lists"); %>
Line 26: <a href="<%= Url.Action("/", "Lists"); %>">Click here to view your lists</a>
Line 27:
Source File: d:\Coding\Playground\HowDidYouKnowMVCSoln\HowDidYouKnowMVC\Views\Home\Index.aspx Line: 25
【问题讨论】:
标签: c# asp.net asp.net-mvc