zoukankan      html  css  js  c++  java
  • Asp.net MVC Combres的简单用法

    第一步:添加nuget包

    【1】添加 nuget包后,会自动在 webconfig里面 添加配置文件(不用改)

    <section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core" /><section name="combres" type="Combres.ConfigSectionSetting, Combres" /></configSections>
    
       <namespaces>
            <add namespace="Combres" />
     <add namespace="Combres.Mvc" /></namespaces>
    
    <combres definitionUrl="~/App_Data/combres.xml" />
    

    【2】添加nuget包后,会在Global.asax文件里面添加一个注册

    第三步:combres.xmls

    <?xml version="1.0" encoding="utf-8" ?>
    <!--
      This file contains basic settings needed for most web apps.
      For full Combres settings (with explanation), refer to the sample definition file: combres_full_with_annotation.xml
      Also, refer to Combres' documentation: http://combres.codeplex.com/documentation	
    -->
    <combres xmlns='urn:combres'>
      <filters>
        <filter type="Combres.Filters.FixUrlsInCssFilter, Combres" />
      </filters>
      <resourceSets url="~/combres.axd"
                    defaultDuration="30"
                    defaultVersion="201601081834"//版本号默认为 auto
                    defaultDebugEnabled="false" //发布后为false,本地debug用 true
                    defaultIgnorePipelineWhenDebug="true"
                    localChangeMonitorInterval="30"
                    remoteChangeMonitorInterval="60"
                    >
    
        <!--公共Css-self插件-->
        <resourceSet name="mainCss" type="css">
          <resource path="~/Styles/main.css"  mode="dynamic" forwardCookie="false" />
        </resourceSet>
    
        <resourceSet name="manageJs" type="js">
          <resource path="~/Scripts/manage/manage.js" mode="dynamic" forwardCookie="false" />
        </resourceSet>
    
        <resourceSet name="loginJs" type="js">
          <resource path="~/Scripts/login/login.js" mode="dynamic" forwardCookie="false" />
        </resourceSet>
    
    
    
      </resourceSets>
    </combres>
    

      

    第四步:页面添加 引用

  • 相关阅读:
    ajax请求默认都是异步请求,怎么变为同步请求
    TP6跨域问题
    localStorage使用总结
    win10 windows management instrumentation cpu占用高解决方法
    限制性股票-股份支付
    可转债会计分类
    其他权益工具投资的交易费用计入成本
    年数总和法
    外币货币性项目汇兑差额应当计入当期损益
    chrome怎么设置点击窗口在新窗口打开
  • 原文地址:https://www.cnblogs.com/alphafly/p/5114250.html
Copyright © 2011-2022 走看看