I am trying to get inline C# to work in my JavaScript files using the MVC Framework. I made this little test code up.
$(document).ready(function() {
ale
As others have said, the C# is not being processed by the server.
A possible solution would be to have a separate view that uses the same model and outputs the JavaScript, then reference that view in your .
Added as per SLaks' answer:
Set the content-type to text/javascript, and put your JavaScript source directly below the <%@ Page directive (without a tag).
Beware that you won't get any IntelliSense for it in VS.