简体   繁体   English

为AjaxToolkit CSS启用捆绑

[英]Enable bundling for AjaxToolkit CSS

I'm currently using the the CompositeScript feature of the ajax ToolkitScriptManager to bundle ajax .js files referenced in assemblies: 我目前正在使用ajax ToolkitScriptManagerCompositeScript功能来捆绑程序ToolkitScriptManager引用的ajax .js文件:

    <ajaxToolkit:ToolkitScriptManager ID="manScript" LoadScriptsBeforeUI="false" EnablePartialRendering="false" runat="server" EnableViewState="false" ScriptMode="Release" EnableCdn="true">
        <CompositeScript ScriptMode="Release" Path="/web/js/ajax/ajaxbundle.min.js">
            <Scripts>
                <asp:ScriptReference Name="WebForms.js"  Assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"  />
                <asp:ScriptReference Name="MicrosoftAjax.js" />
                <asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />
                <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" />
            </Scripts>
        </CompositeScript>
    </ajaxToolkit:ToolkitScriptManager>

I'm wondering if it's also possible to bundle the generated CSS too? 我想知道是否也可以捆绑生成的CSS? I'm getting an extra <link /> which loads in CSS for the ajax ValidatorCallout extender control I'm using 我得到一个额外的<link /> ,该CSS为我正在使用的ajax ValidatorCallout扩展程序控件加载在CSS中

As I can see, you are using pre-v15.1 version of the AJAX Control Toolkit. 如我所见,您正在使用A1AX控制工具包的v15.1之前版本。 It lacks this capability. 它缺少此功能。

You can upgrade your project following Upgrading from v7.x and below article. 您可以按照从v7.x和以下文章进行升级后升级项目。 Take a note on How to Use Bundling and CDN article during an upgrade process. 在升级过程中,记下有关如何使用捆绑和CDN的文章。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM