0

Hi
I have a web page where i need to use some javascript.
If i write all the javascripts and jQuery javascripts in the aspx page it works perfect.
But when i write all the javascripts in separate file called scripts.js and include scripts.js in the aspx page it doesn't work.
Here is how i have included the scripts file in my aspx page or let's say master page:

<script src="../../Scripts/scripts.js" type="text/javascript"></script>

I am using asp.net mvc.

I have been using asp.net and i used to do the same thing in asp.net and it used to work fine but it doesn't work in asp.net mvc. I have been noticing this for quite some time now.

Any advice
Thanks

3
Contributors
3
Replies
5
Views
7 Years
Discussion Span
Last Post by mitulmodi.rcc
0

Your syntax indicates that the scripts folder is two levels up from your aspx page. Is that the actual case?

Meaning, you'd have a directory structure like this

/Scripts/scripts.js
/somedirectory/somedirectory/yourpage.aspx

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.