相关疑难解决方法(0)

在asp.net中的样式表路径中斜杠(/)vs tilde斜杠(〜/)

如何在asp.net中解决这两个路径.为什么这两个给出不同的路径.我们什么时候需要去做这些.

<link href="/common/black_theme/css/style.css"  rel="stylesheet"> (this is working)
<link href="~/common/black_theme/css/style.css"  rel="stylesheet"> (this is not working)
Run Code Online (Sandbox Code Playgroud)

据我所知〜表示应用程序的根目录"Common"是IIS中网站根目录下的文件夹(名为testsite.demo)

物理路径= D:\Physicalpath\WarpFirstSite\testsite.demo 公共文件夹位置 -D:\Physicalpath\WarpFirstSite\testsite.demo\common

asp.net path relative-path stylesheet absolute-path

44
推荐指数
3
解决办法
4万
查看次数

标签 统计

absolute-path ×1

asp.net ×1

path ×1

relative-path ×1

stylesheet ×1