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
As others have said writing c# to your .js file probably isnt the best idea for various reason such as caching of dynamic variables. But sometimes we all have to do things we shouldnt. And if thats the case then there is a NuGet package that allows you to write Razor syntax inside a .js file its available here http://nuget.org/packages/RazorJS