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

Take a look at this:

 <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:

<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 Spaanjaars
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