在我的 ASP.Net 应用程序中找不到 Javascript

标签 javascript asp.net visual-web-developer-2010

我的 javascript 的位置有问题,位置是正确的,但是当我在我的 visual web developer 2010 express 中运行它时,找不到位置,我不知道为什么.. .

这是我的 javascript 的位置:

<script src="Style/javascript/jquery-1.7.1.js" type="text/javascript"></script>

这里是错误:

**Server Error in '/Maitenance' Application.**

**The resource cannot be found.**

**Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.** 

**Requested URL: /Maitenance/Maintenance/Style/javascript/jquery-1.7.1.js**

最佳答案

使用这个...它会起作用

<script src="<%=Page.ResolveUrl("~")%>Style/javascript/jquery-1.7.1.js" type="text/javascript"</script>

关于在我的 ASP.Net 应用程序中找不到 Javascript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14431487/

相关文章:

javascript - 使用 ajax jQuery 解析 JSON

asp.net - UpdatePanel 内按钮的 OnClientClick 事件出现问题

asp.net - (TS) In 'const' enum declarations member initializer must be constant expression

c# - 单元测试 ASP.NET(不是 MVC)——如何通过 "Request is not Available in this context."?

javascript - Backbone : Listening for button clicks on seperate view

javascript - 带有页面滚动条的 jQuery 模态滚动

javascript - 使用JS水平居中没有宽度的div

asp.net-mvc - MVC3 应用程序 - 获取 "Could not load file or assembly ' System.Data.SQLite' 或其依赖项之一。”

c# - 调试 HTTP/1.1 400 错误请求的可视化 Web 开发人员 Web 服务