ASP.NET中的相对路径
发布时间:2020-05-24 06:05:32 所属栏目:asp.Net 来源:互联网
导读:head runat=server meta charset=UTF-8 / titleMake Games with Scirra Software/title meta name=description content=Game making with Construct. / meta name=keywords co
<head runat="server">
<meta charset="UTF-8" />
<title>Make Games with Scirra Software</title>
<meta name="description" content="Game making with Construct." />
<meta name="keywords" content="game maker,game builder,html5,create games,games creator" />
<link rel="stylesheet" href="~/css/default.css" />
<link rel="stylesheet" href="~/plugins/coin-slider/coin-slider-styles.css" />
<link rel="shortcut icon" href="~/images/favicon.ico" />
<link rel="apple-touch-icon" href="~/images/favicon_apple.png" />
<script src="~/js/googleAnalytics.js"></script>
</head>
呈现为: <head>
<meta charset="UTF-8" />
<title>Make Games with Scirra Software</title>
<meta name="description" content="Game making with Construct." />
<meta name="keywords" content="game maker,games creator" />
<link rel="stylesheet" href="../css/default.css" />
<link rel="stylesheet" href="../plugins/coin-slider/coin-slider-styles.css" />
<link rel="shortcut icon" href="../images/favicon.ico" />
<link rel="apple-touch-icon" href="../images/favicon_apple.png" />
<script src="~/js/googleAnalytics.js"></script>
</head>
为什么JavaScript URL/而不是../? 解决方法确实是奇怪的实现,但遗憾的是ASP.NET处理这个方式.这是我做的补偿:<script src="<%=ResolveClientUrl("~/js/googleAnalytics.js")%>"></script> (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 使用MVC在ASP.NET中实现API的最佳方法是什么?
- asp.net-mvc – AJAX在IIS 7.5中返回404(本地),但在其他IIS
- asp.net-mvc-3 – jQuery.validator.unobtrusive.adapters.
- 在ASP.NET网站中使用单例连接是一个好主意
- asp.net – 如何更改.ASPX自动格式化设置(Visual Studio)
- asp.net – 如何根据用户的角色创建具有不同显示的视图?
- asp.net – 使用回发解析.Net页面
- asp.net核心 – Kestrel托管基础
- 在ASP.NET MVC 2中实现DropDownList的最佳方式?
- 如何将应用程序从经典ASP迁移到ASP.NET MVC?
推荐文章
站长推荐
- 在预编译asp.net网站 – 是否重要?
- asp.net-mvc-3 – 使用csvhelper(nuGET)和C#MVC导
- dependency-injection – ActionFilterAttribute
- asp.net-mvc – Nuget如何指定包位置?
- asp.net-mvc-2 – 读取HTTP请求自定义标头
- ASP.NET相对路径
- asp.net – WebControl创建中的Render和RenderCo
- asp.net – web.config allowDefinition = Machi
- ASP.NET Web.Api插件架构
- asp.net-mvc – 使用带有剃刀的html选择框
热点阅读
