I've been following Steven Sanderson's book called Pro ASP.NET MVC Framework, and I'm running into an exception:
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: CS0121: The call is ambiguous between the following methods or properties: 'Microsoft.Web.Mvc.ViewExtensions.RenderAction(System.Web.Mvc.HtmlHelper, string, string)' and 'System.Web.Mvc.Html.ChildActionExtensions.RenderAction(System.Web.Mvc.HtmlHelper, string, string)'
Line 15: </div>
Line 16: <div id="catagories">
Line 17: <% Html.RenderAction("Menu", "Nav"); %>
Line 18: </div>
Line 19: <div id="content">
My Site.Master code:
<body>
<div id="header">
<div class="title">
SPORT STORE</div>
</div>
<div id="catagories">
<% Html.RenderAction("Menu", "Nav"); %>
</div>
<div id="content">
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
</div>
</body>
I thank I Know where is wrong. When I change Microsoft.Web.Mvc.dll of MVC1 to Microsoft.Web.Mvc.dll of MVC2, this error is solved. But it appear other error:
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: CS0234: The type or namespace name 'NavLink' does not exist in the namespace 'WebUI.Controllers' (are you missing an assembly reference?)
Source Error:
Line 170:
Line 171: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 172: public class views_nav_menu_ascx : System.Web.Mvc.ViewUserControl<IEnumerable<WebUI.Controllers.NavLink>> {
Line 173:
Line 174: private static bool @__initialized;
So, How can I do now?