且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

IIS URL重写模块:Url.Content()无法正确解析CSS/图像路径

更新时间:2023-02-23 16:14:51

尝试使用Request.ApplicationPath.这样的事情应该起作用:

Try using Request.ApplicationPath. Something like this should work:

<link href="@(Request.ApplicationPath + "Content/Site.css")" rel="stylesheet" type="text/css" />