Syntax highlighting of javascript file in an ASP.NET MVC view? -


I have an ASP.NET MVC website, which has a special JavaScript file that has something to run through the razor parser I have to submit the @ url value I have an administrator's action whose name is Public ActionSercent Javascript () , which gives javascript.cshtml as partial view.

All this works well, except that I lose syntax highlighting javascript. There is a way to enable the razor parser on custom file extensions, so can I rename my view to javascript.js and highlight the syntax? To avoid this, is there any other way that I can force the scene file as Javascript to syntax highlighting when it comes to & lt; Script & gt; is not wrapped in the tag

Javascript to @ Url.Action (.. .) In the call, there are better ways of referencing controller functions compared to baking. For example:



Comments