Using external javascript files with asp.net MVC
Posted
by twal
on Stack Overflow
See other posts from Stack Overflow
or by twal
Published on 2010-06-08T21:17:54Z
Indexed on
2010/06/08
21:22 UTC
Read the original article
Hit count: 218
JavaScript
|asp.net-mvc
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!
© Stack Overflow or respective owner