如何将 Html.RenderPartial 用于其他文件夹中的 PartialViews?
我尝试过:
<% Html.RenderPartial("~/Views/User/Users.ascx", Model); %>
它抛出了一个错误:
System.InvalidOperationException: The partial view '~/Views/User/Users.ascx' was not found. The following locations were searched:
~/Views/Main/~/Views/User/Users.ascx.aspx
~/Views/Main/~/Views/User/Users.ascx.ascx
~/Views/Shared/~/Views/User/Users.ascx.aspx
~/Views/Shared/~/Views/User/Users.ascx.ascx
这里是否缺少任何内容或无法在其他文件夹中调用部分视图?