MVC Sections allow you to manipulate where in the DOM things appear, this is helpful for scripts that require libraries to be available.
jQuery
In the Index.cshtml
file the script below requires that jQuery is loaded.
1 | @section ScriptsGameController { |
This section can then be displayed in the _Layout.cshtml
file
1 | ... |