I have following section defined on my _Layout.cshtml
@RenderSection("Scripts", false)
I can easily use it from a view as follows :
@section Scripts {
@*Stuff comes here*@
}
What I am struggling is how to get some content injected inside this section from a partial view.
Let's assume following is my view page :
@section Scripts {
<script>
//code comes here
</script>
}
<div>
poo bar poo
</div>
<div>
@Html.Partial("_myPartial")
</div>
I need to inject some content inside Scripts
section from _myPartial
partial view.
do you have any idea how?