Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AJAX Control Toolkit Loading All Scripts

I have a bit of a weird problem I can't seem to fix. I am using the AJAX Control Toolkit's calendar extender on some of my pages. Despite the information I've found via the web I can't seem to get it working with a regular ScriptManager control, it only works with a ToolkitScriptManager. However I've noticed that when the page loads it adds some 84 script files for every possible control script provided by the toolkit:

A selection of the scripts being loaded

Is this the expected behaviour, and can I turn it off? I only need it to load the relevant scripts to handle the calendar extender.

like image 394
Katstevens Avatar asked Jun 23 '26 23:06

Katstevens


1 Answers

In current version of ACT you can group extenders in bundle and specify which bundles you need to include. Add AjaxControlToolkit.config file to project like here Codeplex AjaxControlToolkit.config, add new controlBundle entry to this file for CalendarExtender like this:

<controlBundle name="Calendar">
  <control name="CalendarExtender"></control>
</controlBundle>

and specify this bundle in ToolkitScriptmanager control:

 <ajaxToolkit:ToolkitScriptManager runat="server" CombineScripts="true" 
      ScriptMode="Release" >
      <ControlBundles>
           <ajaxToolkit:ControlBundle Name="Calendar" />
      </ControlBundles>
 </ajaxToolkit:ToolkitScriptManager>
like image 194
Yuriy Rozhovetskiy Avatar answered Jun 26 '26 20:06

Yuriy Rozhovetskiy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!