DGibbs DGibbs - 1 year ago 60
Ajax Question

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

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download