I have a project using ASP.NET Boilerplate. I want to add more functionality by using jQuery.
I try to write a simple code such as (below) to the end of a page (such as
do what the others said, but use
Also aspnet boilerplate does not use bundles or a
@RenderSection("scripts", required: false)
in it's layout.
jquery is linked in the layout, so you must use the layout. The default _ViewStart.cshtml defines the _Layout.cshtml as the layout.
To get the javascript in the scripts section from your cshtml pages (views) to render you must add the
@RenderSection("scripts", required: false)
to the _Layout.cshtml