ASP.NET MVC - Where do you put your .js files if you dont want to store them in /Scripts?
- by Jimbo
I have a number of .js files that I would like to be stored in the same directories as their views (they're specific to a view - its simply to keep the javascript separate from the view's HTML)
However, adding them to the /Views/ControllerName/ directory wont work because when a request is made to the webserver for the .js file:
<script type="text/javascript" src="/Views/ControllerName/myscript.js"></script>
It would essentially be directed at the 'Views' controller which obviously doesnt exist.
Thanks