我在共享文件夹的子文件夹中有几个页面。MVC 5发布时的文件夹结构问题
我渲染视图页面上theese的局部视图这样的:
@Html.Partial("Scripts/Case_Action")
@Html.Partial("Scripts/Case_Action_Comments")
@Html.Partial("Scripts/Case_History")
当我调试这个完美的作品,但是当我发布网站现在不找到文件。
当我调试的URL看起来像这样:http://localhost:44300/Case/id
,当我发布的URL是这样的:http://xx.xxx.xx.xx/FOLDER/Case/id
其中xxx *是IP。
那么我怎么能得到这个工作,当我调试和当我发布?
这里是错误:
The partial view 'Scripts/Case_Action' was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Case/Scripts/Case_Action.aspx
~/Views/Case/Scripts/Case_Action.ascx
~/Views/Shared/Scripts/Case_Action.aspx
~/Views/Shared/Scripts/Case_Action.ascx
~/Views/Case/Scripts/Case_Action.cshtml
~/Views/Case/Scripts/Case_Action.vbhtml
~/Views/Shared/Scripts/Case_Action.cshtml
~/Views/Shared/Scripts/Case_Action.vbhtml
发布到什么? – 2014-08-27 11:37:11
试试这个'@ Html.Partial(“Scripts/Case_Action_Comments.cshtml”)'在别人也是 – Amit 2014-08-27 11:38:33
@AmitAgrawal会做什么?视图引擎显然试图找到'.cshtml'文件。 – Stijn 2014-08-27 11:40:59