I've a problem with adding jQuery to an ASP.NET MVC application. I add jquery to Site.Master like that:
<script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
In Visual Studio 2010 this is o.k. - now I publish a application to a web server (IIS 7) an a Folder like:
h ttp://localhost/AnApplication
When calling the site I see a 404 - File Not found in FireBug Net - View. FireBug shows that the Application is looking for:
h ttp://localhost/Scripts/jquery-1.4.1.js
But file would be at h ttp://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 404 Error in 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 without success.
Thanks for your help. Tobi