Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的根文件夹中有一个file.css多数民众赞成。有没有办法可以将它放在一个名为的文件夹中,/content或者/root/它不会弄乱我的主项目根文件夹?
file.css
/content
/root/
是的你可以。要在您的视图文件中引用它,您可以执行以下操作:(MVC4 / Razor v2)
<link href="~/content/file.css" rel="stylesheet" type="text/css" />
对于 MVC3
<link href="@Url.Content("~/content/file.css")" rel="stylesheet" type="text/css" />