I have an area in my project but the view engine fails to find my view, it does not look for views in my areas directory?
The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/foo/Index.aspx ~/Views/foo/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx ~/Views/foo/Index.cshtml ~/Vie开发者_如何学Pythonws/foo/Index.vbhtml ~/Views/Shared/Index.cshtml ~/Views/Shared/Index.vbhtml
You must specify the area you want to use when creating ActionLinks and if you're registering routes outside of the area.
<%=Html.ActionLink("Test", "Action", "Controller", new { area = "MyArea" }, null) %>
精彩评论