I'm after a way of getting my referenced .js files in my 'master' cshtml files to come through to the 'child' cshtml files.
I have something like this in the master file, so the .js files always get referenced (and indeed I get js intellisense in the master file):
if (false)
{
<script type="text/javascript" src="../scripts/jquery.js"></script>
}
However when I reference the master.cshtml file in a 'child' page like this:
@{
Layout = "~/Views/Shared/master.cshtml";
}
I get no javascript intellisense. I really don't want to have to put the script tags at the top of each child page, there are a lot of script tags, and a lot of child pages!
The Razor editor right now cannot infer which script files are in use (this is because Razor layout pages are set via code and the editor does not execute a view page). Unfortunately you will have to include those script tags if you want JavaScript IntelliSense to work in your view pages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With