I want to include the code in a javascript file inside of my Asp.net MVC page view (the view is a javascript result as described here. I want to do this for consolidation reasons for my javascript, to lower the loading overhead of my complex GUI for my RIA, to make compression more efficient, and to make debugging easier.
The issue is that I am using the Ext designer to create my GUI. Every time my project is exported it creates 2 .js files per class, and since my GUI is pretty complex I have quite a lot of .js files already.
So my idea to consolidate (at runtime) all the javascript files into one was to have my main JavaScriptViewResult
Razor view contain Html.RenderPartial()
view calls to the .js files.
However, if I call Html.RenderPartial("GUI/BaseLayout.js")
, I get an exception because it tries to find "GUI/BaseLayout.js.cshtml".
Is there any way to force Asp.net MVC to not add the view engine's extension to the RenderPartial call, or is there a better way to concatenate all my .js files into one outputted script file?