I\'m new to ASP.NET/MVC3 and I\'m trying to figure out how to separate my JavaScript (which contains C#) from the rest of the HTML.
If I put them into .JS files and
If anything stops working while referencing to an external js-file, perhaps you're doing something wrong. Provide us with some example code on how you reference the external file. The other way is to just place the JavaScript-code between script-tags somewhere in the file. If it is in the _Layout.cshtml, you can place it in the head-tag and in another cshtml-file, place it on top between the script-tags.