MVC4 Render Scripts Section embedded in areas
In my Project I have a the normal _Layout.cshtml in the root Shared =>
/Views/Shared/_Layout.cshtml.
I have an area in my project called MyArea, in it I have a _ViewStart
which points at the _Layout.cshtml in
/Areas/MyArea/Views/Shared/_Layout.cshtml, this _Layout points to the one
in i defined at the start. My only question is: in my root _Layout.cshtml
is:
@RenderSection("scripts", required: false)
So I thought maybe putting this in my MyArea _Layout:
@section Scripts {
@RenderSection("scripts", required: false)
}
But that doesn't render the script where I want it to. So how do you get
it to put the scripts you make in your views to put it into the section
Scripts.
No comments:
Post a Comment