I have a layout with an @RenderSection("scripts")
section and I have a bundle that would need to be included in this section for some views. I thought that just doing this in the view would work, but it's not rendering the scripts.
@section scripts {
@Scripts.Render("~/bundles/myBundle")
}
In my view, how can I include a bundle to the scripts section?
Layout
@Scripts.Render("~/bundles/jquery", "~/bundles/scripts")
@RenderSection("scripts", required: false)
View
@section scripts {
@Scripts.Render("~/bundles/movie")
}
~/bundles/movie
and not~/scripts/movie
in yourBundleConfig
. – Mrchief