asp.net mvc 3 with razor
I have a script inside a partial view
<script type="text/javascript">
function MYFunction()
{
...
</script>
It’s working fine
If I move the code inside a .js file and try to load the script with
<script src="path to my script file" type="text/javascript"></script>
The script doesn’t execute some code, a jquery.ajax, the rest of the code is executed (I’m debugging inside visual studio)
Any suggestion?
Try following: