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
Javascript code should not contain any dynamically generated code. If you need to load in certain config settings you should use a single inline script tag which defines the variables. Other options are loading in a json config file which is dynamically generated or basing it on dom content depending on the specific dynamic information you need. (Ajax being the most common way I would say, though that really would depend on your situation). Either way, the idea is that javascript and css files are always static.