简体   繁体   中英

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:

    <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? I'm getting an extra <link /> which loads in CSS for the ajax ValidatorCallout extender control I'm using

As I can see, you are using pre-v15.1 version of the AJAX Control Toolkit. It lacks this capability.

You can upgrade your project following Upgrading from v7.x and below article. Take a note on How to Use Bundling and CDN article during an upgrade process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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