0
我有一个ASP.NET MVC 3站点,它使用ClientDependency framework作为dep。决议(CSS/JS)。Cleint未指定布局的依赖路径
我的基本路径的在/Shared/_Layout.cshtml定义是这样的:
@MvcHtmlString.Create(Html.RenderCssHere(new List<IClientDependencyPath> {
new BasicPath("Base", "~/Content/themes/base"),
new BasicPath("Content", "~/Content")
}))
我想有一个页面,而一个标准的布局。我通过致电
@{
Layout = null;
Html.RequiresCss("FileUpload/fileUpload.css", "Content", 20);
}
但是,我不能再请求dep。如上所示,因为“内容”路径没有定义。
我对ClientDependency框架颇为陌生,所以哪种方法可以让我在非布局视图中获得依赖关系?