@ Html.Partial - Razor:我收到错误消息,但它仍然有效

时间:2014-08-09 14:03:36

标签: html asp.net-mvc razor

使用"System.Web.WebPages.Html.HtmlHelper does not contain a definition for Partial and no extension method Partial accepting a first argument of type System.Web.WebPages.Html.HtmlHelper could be found"时收到@Html.Partial错误消息。但是,它仍然按预期工作,我的部分显示。我想摆脱这个错误。这是我的HTML,如果它有帮助: -

<div id="reference">
@Html.Partial("Reference/_PermissionType")
@Html.Partial("Reference/_ProtocolType")
@Html.Partial("Reference/_ResponseType")
@Html.Partial("Reference/_SystemType")
</div>

1 个答案:

答案 0 :(得分:0)

web.config复制Views folder文件并将其放在引用部分视图的Reference folder中。