I have a problem adding jQuery to an ASP.NET MVC application. I am adding jquery to Site.Master:
<script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
In Visual Studio 2010, this is ok - now I publish the application on a web server (IIS 7), for example in a folder:
http:
When I call the site, I see a 404 file - File not found in FireBug Net - View. FireBug shows that the application is looking for:
http:
But the file will be http: //localhost/AnApplication/Scripts/jquery-1.4.1.js
How can I reference the jquery.js file that asp.net finds the jQuery file without generating a 404 error in the IIS log file?
I tried with <script src="../Scripts/jquery-1.4.1.js" type="text/javascript" />and <script src="~/Scripts/jquery-1.4.1.js" type="text/javascript" />, but to no avail.
source
share