已定义以下部分,但尚未针对布局页面“〜/ Views / Shared / Incident_Layout.cshtml”:“Scripts”进行渲染。 [英] The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/Incident_Layout.cshtml": "Scripts".

查看:67
本文介绍了已定义以下部分,但尚未针对布局页面“〜/ Views / Shared / Incident_Layout.cshtml”:“Scripts”进行渲染。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发mvc项目并在执行项目时出现一个错误,即







以下部分已定义,但尚未针对布局页面进行渲染〜/ Views / Shared / Incident_Layout.cshtml:脚本。



< br $> b $ b

请帮帮我。



谢谢你。

i was developing the mvc project and while excute the project one error occur i.e



"The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/Incident_Layout.cshtml": "Scripts"."



please help me.

thank u.

推荐答案

这意味着在你的页面中你有这样的东西:

It means that in your page you have something like this:
@section Scripts {

}



但布局页面中没有@RenderSection(Scripts)...

您可以添加它或检查它是否只是一种类型部分名称......


But there is no @RenderSection("Scripts") in the layout page...
You may add it or check if it is only a type in the section name...


这篇关于已定义以下部分,但尚未针对布局页面“〜/ Views / Shared / Incident_Layout.cshtml”:“Scripts”进行渲染。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆