代码改变世界

为ASP.NET MVC Client-side Resource Combine 添加中文支持

2009-09-23 11:32  午夜瞎想  阅读(338)  评论(0编辑  收藏  举报

以前介绍过ASP.NET MVC Client-side Resource Combine 主要的用途是集中管理js css 和压缩缓存js css 等文件.

但老外写的不支持中文,现在项目中需要用到了才发现,今天把编码支持加了上去.留个备份

xml中

<?xml version="1.0" encoding="utf-8" ?>

<resourceCombine url="~/combine.axd" defaultDuration="15" defaultVersion="1" defaultCacheDisabled="false" >

    <resourceSet name="siteCss" type="css" duration="30" version="1">

        <resource path="~/content/css/theme.css" />

        <resource path="~/content/css/style.css" />

        <resource path="~/Content/thickbox/thickbox.css" />

        <resource path="~/Content/jquery-treeview/jquery.treeview.css" />

    </resourceSet>

    <resourceSet name="siteJs" type="js" duration="30" version="a1" charset="gb2312">

        <resource path="~/Scripts/jquery-1.3.2.min.js" mode="LocalStatic" />

        <resource path="~/Content/jquery-treeview/jquery.treeview.js" mode="LocalStatic" />

        <resource path="~/Content/thickbox/thickbox-compressed.js" mode="LocalDynamic" />

        <resource path="~/Content/jquery-treeview/jquery.cookie.js" mode="LocalStatic" />

    </resourceSet>

</resourceCombine>

下载地址:Mvc.ResourceCombine.rar