View Single Post
  #30 (permalink)  
Old February 6th, 2015, 04:11 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Take a look at this:

Code:
 <script src="Scripts/jquery-2.1.3.min.js"></script>
This will search for the Scripts folder relative to the page which may not be what you want. It will work for pages in the root but not for pages in sub folders.

You should use a root based URL instead:

Code:
<script src="/Scripts/jquery-2.1.3.min.js"></script>
Alternatively let ASP.NET figure out the location by using a ScriptReference as explained in Chapter 11.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Last edited by Imar; February 6th, 2015 at 04:23 AM..
Reply With Quote