我重新修改了View的映射規(guī)則,代碼如下這樣如果不用Partial,能按照我的意愿對應(yīng)到我要的View,例如輸入http://localhost:2539/user/index ,對應(yīng)到~/Views/User/pc/Index.cshtml,然后Index.cshtml又加載片段的代碼@Html.Partial("_Sidebar"),_Sidebar.cshtml放置于~/Views/User/pc/Shared/_Sidebar.cshtml運行后報錯
MVC @Html.Partial加載不了片段
幕布斯7119047
2018-08-10 07:10:28