我在Views/Shared文件夹下有4个视图。
- Attendance Track.cshtml(主视图)
- _Attendance.cshtml(局部视图)
- _Leaves.cshtml(局部视图)
- _Efforts.cshtml(局部视图)
试图在主视图中呈现3个局部视图,但无法呈现。不知道哪里出了问题。 在主视图中呈现局部视图的代码:
<div id="RenderAttendance">
@Html.Partial("~/Views/Shared/_Attendance.cshtml");
</div>
<div id="RenderLeaves" >
@Html.Partial("~/Views/Shared/_Leaves.cshtml");
</div>
<div id="RenderEfforts" >
@Html.Partial("~/Views/Shared/_Efforts.cshtml");
</div>