Using external javascript files with asp.net MVC
- by twal
I have some javascript inwhich I am using such helpers as
var url = <%=ResolveUrl("~/controller/action") %>
When the javascript is embeded in the .aspx page using the
<script> tag everything works fine
When I move it out to an external file those scripts that have the helper methods do not work.
Other scripts do just the ones with the
var url = <%=ResolveUrl("~/controller/action") %>
do not.
Are these not possible to use in external javascript files??
I would like to get all of my javascript out of the aspx files if I can.
thanks!