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
Instead, do something like this in your view page:
var options = { parameter1 : '@(SomeC#Value)', parameter2 : '@(SomeC#Value)', parameter3 : '@(SomeC#Value)', }
then call something like:
myJavascriptObject.init(options);
and have the Javascript use the passed-in options to control flow, etc.