上的錯誤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
如果取消路徑,它顯示相同的事情! –