我正在尝试将jQueryUI捆绑在一个请求中。
Global.asax:
var cssjQuery = new StyleBundle("~/Content/BundleCSS/jQuery");
cssjQuery.IncludeDirectory("~/Content/themes/base", "*.css");布局:
<link href="@Styles.Url("~/Content/BundleCSS/jQuery")" rel="stylesheet" type="text/css" />文件夹结构:
现在的问题是无法加载图像,因为没有文件夹"BundleCSS":
http://localhost:64648/Content/BundleCSS/images/ui-bg_flat_75_ffffff_40x100.png我怎样才能解决这个问题?
发布于 2012-10-01 09:36:58
为什么不简单地在主题目录路径上定义包:
var cssjQuery = new StyleBundle("~/Content/themes/base/jquery-ui-bundle");
cssjQuery.IncludeDirectory("~/Content/themes/base", "*.css"); 相对图像路径仍然工作(因为CSS的目录将保持不变)。
另外,请记住,最后一部分(jquery-ui-bundle)被视为文件名,因此它可以是您想要的任何内容(只要它与其中一个文件不相同)。
https://stackoverflow.com/questions/12669641
复制相似问题