AJAX控件工具包加载所有脚本 [英] AJAX Control Toolkit Loading All Scripts

查看:264
本文介绍了AJAX控件工具包加载所有脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一点一个奇怪的问题,我似乎无法修复的。我使用了一些我的网页的AJAX控件工具包的日历扩展。尽管信息我已经通过网络,我似乎无法得到它与普通的的ScriptManager 控制工作中发现,它的只有的工作有 ToolkitScriptManager 。不过,我注意到,当页面加载它增加了一些84脚本文件通过工具包提供一切可能的控制脚本:

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:

这是预期的行为,我可以把它关掉?我只需要它来加载相关脚本来处理日历扩展。

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.

推荐答案

在ACT,你可以捆绑组扩展和指定的当前版本捆绑了您需要包括。
添加 AjaxControlToolkit.config 文件到项目喜欢这里的 codePLEX AjaxControlToolkit.config ,新controlBundle条目添加到该文件CalendarExtender是这样的:

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>

和指定此捆绑在ToolkitScriptmanager控制:

and specify this bundle in ToolkitScriptmanager control:

 <ajaxToolkit:ToolkitScriptManager runat="server" CombineScripts="true" 
      ScriptMode="Release" >
      <ControlBundles>
           <ajaxToolkit:ControlBundle Name="Calendar" />
      </ControlBundles>
 </ajaxToolkit:ToolkitScriptManager>

这篇关于AJAX控件工具包加载所有脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆