You’ll need to redefine the section in _MainPage.cshtml
.
_BootstrapLayout.cshtml
@RenderSection("scripts", false)
_MainPage.cshtml
@section scripts
{
@RenderSection("scripts", false)
}
Index.cshtml
@section scripts
{
<script>
// etc.
</script>
}