上的错误404我创造了这个:一个HTML链接
<a href="~/Areas/Admin/Views/Event/Index.cshtml"><span>Events:</span> <span class="badge">@ViewBag.Count</span></a>
算表的数量。当我尝试浏览到参考:~/Areas/Admin/Views/Event/Index.cshtml
我得到如下:
HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
我已经验证了,我已经把它改为:@Html.ActionLink("Event", "Index")
到:@Url.View("Event", "Index")
更多的人,我已经仔细查看路径,我已经从控制器中删除了授权并在互联网上搜索,但没有。
有人可以给我一些建议吗?
您是否尝试过没有〜 – PersyJack
您不直接链接到视图。你链接到行动。请记住,您正在使用MVC。 – Amy
如果取消路径,它显示相同的事情! –