【发布时间】:2016-10-03 07:13:24
【问题描述】:
我收到以下错误。
System.Web.Mvc.dll 中出现“System.InvalidOperationException”类型的异常,但未在用户代码中处理
附加信息:未找到局部视图“../Shared/Partial/_ReferencePartial.cshtml”或没有视图引擎支持搜索的位置。搜索了以下位置:
我在Area/Admin 中有登录控制器。在Login.cshtml 视图文件中,我引用了包含对脚本文件的引用的Partial View 文件。该文件位于文件夹Solution/Project/Views/Shared/Partial。
下面是我的Login.cshtml查看文件代码。
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>@Messages.Login</title>
@Html.Partial("../Shared/Partial/_ReferencePartial.cshtml")
</head>
...
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-partialview