报错如下:
只需要在Render的后面添加@RenderSection("scripts", required: false)
@Scripts.Render("~/Content/bootstrap-fileinput/js")
@RenderSection("scripts", required: false)
并在子页的script写在@section scripts{}
之间
@section scripts{
<script></script>
}
@RenderSection("scripts", required: false)
@RenderSection("Styles", required: false)
@section Styles{
}
@section Scripts{
}