ajax control tool kit generates 100's of ScriptResource.axd

2k Views Asked by At

ASP.net VS2008 .net3.5

I have been using the Ajax Control tool kit for years, and today I downloaded to latest version for 3.5.

the took kit works but generate 100's of line like this one

<script type="text/javascript" src="/shs-vb/ScriptResource.axd?d=K-TRG1ZyD75GiB2qjZl-kxNm4m6VgRN…MESAcdMp6J32NsJhIAG9PEtl3ggamidSswF7NLGK0&t=ffffffffcda035a6"></script>

in the html code.

It happen last year but I have no recollection on how it was solved. It is something to do with updating. I try to delete all references in the bin folder than add the reference again. I removed and recreated the toolbox tab.

Is there an Reference to update in the web.config? any help would be appreciated.

1

There are 1 best solutions below

1
On

Set CombineScripts and ScriptMode properties for toolkit script manager control:

<ajaxToolkit:ToolkitScriptManager runat="server" CombineScripts="true" ScriptMode="Release" >
...
</ajaxToolkit:ToolkitScriptManager>

By default AjaxControlToolkit loads all scripts than it generate 100's of line

<script type="text/javascript" src="..."></script>

You can manage what scripts for what controls should be added by updating web.config

<ajaxControlToolkit>
  <controlBundles>
    <controlBundle>
        ...
    </controlBundle>
  </controlBundles>
</ajaxControlToolkit>