简介
Coolite Toolkit 是一个支持ASP.NET AJAX的Web控件。
Coolite Toolkit是基于跨浏览器的ExtJS 库开发而来的,并且简化了开发步骤,并且包含有丰富的Ajax运用。
Coolite Toolkit和ExtJS 都是开源的。
官方主页:http://coolite.com
下载地址:http://coolite.com/download
Samples: http://examples.coolite.com

而且我在cnblogs 建立了小组,用cnblogs的可以去加入:http://space.cnblogs.com/group/coolite/ (csdn 管理员不要踢我 - 。-!)

另外最近我加入了讨论Coolite的Q 群:86399374

先给那些没有用过ExtJs 或 Coolite 的朋友打一下预防针-- 很多人都知道extjs控件又大又慢,但因为它界面美观,ajax+json操作简单方便,因此作为企业应用还是不错的选择。而Coolite基于 extjs,因此无可避免也是继承这个缺点(我现在用的0.7版本的dll有6M多)。但是用了Coolite,你就可以省掉一大串那样管理的js代码了,界面完全可以用它来简单配置就得到很cool的效果,js只是作为少量的客户端操作。

Coolite最大不足是:还是开发阶段,bug不少。

废话少说,给你一个简单的ajax例子,你就明白为什么我喜欢它了:

1. AjaxEvet:

//这是一个服务端方法

protected void UpdateTimeStamp(object sender, AjaxEventArgs e)
  {
    this.SetTime();
  }
//Html 调用上述方法
    <ext:Button ID="Button1" runat="server" Text="Click Me">
      <AjaxEvents>
        <Click OnEvent="UpdateTimeStamp">
          <EventMask ShowMask="true" MinDelay="500" Msg="Updating TimeStamp..."  />
        </Click>
      </AjaxEvents>
    </ext:Button>

OnEvent="UpdateTimeStamp" 就是指点击按钮后调用服务端方法UpdateTimeStamp 来更新某个标签的时间

2. AjaxMethod:

<script runat="server">
  [AjaxMethod]
  public void SetTimeStamp()
  {
    this.Label1.Text = string.Concat("Server Time: ", DateTime.Now.ToLongTimeString());
  }
</script>
<ext:Button ID="Button5" runat="server" Text="Click Me" Icon="Lightning">
  <Listeners>
    <Click Handler="Coolite.AjaxMethods.SetTimeStamp();" />
  </Listeners>
</ext:Button>

第一次用coolite的人基本都会漏掉配置这一至关重要的环节。

如果想开启ajax事件,请记得在 web.config 里做以下配置:

<httpHandlers>
<add path="*/coolite.axd" verb="*" type="Coolite.Ext.Web.ResourceManager" validate="false"/>
</httpHandlers>

<httpModules>
<add name="AjaxRequestModule" type="Coolite.Ext.Web.AjaxRequestModule, Coolite.Ext.Web"/>
</httpModules>

<modules>
<!--Coolite Config-->
<add name="AjaxRequestModule" preCondition="managedHandler" type="Coolite.Ext.Web.AjaxRequestModule, Coolite.Ext.Web"/>
</modules>

<handlers>
<!--Coolite Config-->
<add name="AjaxRequestHandler" verb="*" path="*/coolite.axd" preCondition="integratedMode" type="Coolite.Ext.Web.ResourceManager"/>
</handlers>

官方关于配置的详细说明文件:

--------------------------------------------------------------------------
SAMPLE WEB.CONFIG
--------------------------------------------------------------------------
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="coolite" type="Coolite.Web.UI.GlobalConfig" requirePermission="false" />
</configSections>
<!--
COOLITE GLOBAL CONFIGURATION PROPERTIES
ajaxEventUrl : string
The url to request for all AjaxEvents.
Default is "".
ajaxMethodProxy : ClientProxy
Specifies whether server-side Methods marked with the [AjaxMethod] attribute will output configuration script to the client.
If false, the AjaxMethods can still be called, but the Method proxies are not automatically generated.
Specifies ajax method proxies creation. The Default value is to Create the proxy for each ajax method.
Default is 'Default'. Options include [Default|Include|Ignore]
ajaxViewStateMode : ViewStateMode
Specifies whether the ViewState should be returned and updated on the client during an AjaxEvent.
The Default value is to Exclude the ViewState from the Response.
Default is 'Default'. Options include [Default|Exclude|Include]
cleanResourceUrl : boolean
The Coolite controls can clean up the autogenerate WebResource Url so they look presentable.
Default is 'true'. Options include [true|false]
clientInitAjaxMethods : boolean
Specifies whether server-side Methods marked with the [AjaxMethod] attribute will output configuration script to the client.
If false, the AjaxMethods can still be called, but the Method proxies are not automatically generated.
Default is 'false'. Options include [true|false]
gzip : boolean
Whether to automatically render scripts with gzip compression.
Only works when renderScripts="Embedded" and/or renderStyles="Embedded".
Default is true. Options include [true|false]
scriptAdapter : string
Gets or Sets the current script Adapter.
Default is "Ext". Options include [Ext|jQuery|Prototype|YUI]
renderScripts : ResourceLocationType
Whether to have the coolite controls output the required JavaScript includes or not.
Gives developer option of manually including required <script> files.
Default is Embedded. Options include [Embedded|File|None]
renderStyles : ResourceLocationType
Whether to have the coolite controls output the required StyleSheet includes or not.
Gives developer option of manually including required <link> or <style> files.
Default is Embedded. Options include [Embedded|File|None]
resourcePath : string
Gets the prefix of the Url path to the base ~/Coolite/ folder containing the resources files for this project.
The path can be Absolute or Relative.
scriptMode : ScriptMode
Whether to include the Release (condensed) or Debug (with inline documentation) Ext JavaScript files.
Default is "Release". Options include [Release|Debug]
sourceFormatting : boolean
Specifies whether the scripts rendered to the page should be formatted. 'True' = formatting, 'False' = minified/compressed.
Default is 'false'. Options include [true|false]
stateProvider : StateProvider
Gets or Sets the current script Adapter.
Default is 'PostBack'. Options include [PostBack|Cookie|None]
theme : Theme
Which embedded theme to use.
Default is "Default". Options include [Default|Gray|Slate]
quickTips : boolean
Specifies whether to render the QuickTips. Provides attractive and customizable tooltips for any element.
Default is 'true'. Options include [true|false]
-->
<coolite theme="Default" />

<!--
The following system.web section is only requited for running ASP.NET AJAX under Internet
Information Services 6.0 (or earlier). This section is not necessary for IIS 7.0 or later.
-->
<system.web>
<httpHandlers>
<add path="*/coolite.axd" verb="*" type="Coolite.Ext.Web.ResourceManager" validate="false" />
</httpHandlers>
<httpModules>
<add name="AjaxRequestModule" type="Coolite.Ext.Web.AjaxRequestModule, Coolite.Ext.Web" />
</httpModules>
</system.web>

<!--
The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0.
It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="AjaxRequestModule" preCondition="managedHandler" type="Coolite.Ext.Web.AjaxRequestModule, Coolite.Ext.Web" />
</modules>
<handlers>
<add name="AjaxRequestHandler" verb="*" path="*/coolite.axd" preCondition="integratedMode" type="Coolite.Ext.Web.ResourceManager"/>
</handlers>
</system.webServer>
</configuration>

转载于:https://www.cnblogs.com/mikechang/archive/2010/03/19/1689664.html

asp.net Coolite 学习相关推荐

  1. asp.net2.0学习历程 菜鸟到中级程序员的飞跃【月儿原创】

    asp.net2.0学习历程 菜鸟到中级程序员的飞跃 --30本好书点评 作者:清清月儿 主页:http://blog.csdn.net/21aspnet/           时间:2007.5.1 ...

  2. ASP.NET Atlas学习团队建议收集

    请在这里留下您对ASP.NET Atlas学习团队的宝贵意见和建议,让我们一起把它办得更好! 申请加入,请在http://dflying.cnblogs.com/archive/2006/05/09/ ...

  3. ASP.NET MVC学习之路由篇(2)

    ASP.NET MVC学习之路由篇(2) 原文:ASP.NET MVC学习之路由篇(2) 继ASP.NET MVC学习之路由篇(1)后继续学习. 7.解决与物理路径的冲突 当发送一个请求至ASP.NE ...

  4. ASP.NET MVC学习资料 新增几个开源项目

    ASP.NET MVC学习资料 新增几个开源项目 ASP.NET MVC MSDN API:  System.Web.Mvc Namespace (暂无中文版):  http://msdn.micro ...

  5. ASP.NET MVC学习之控制器篇

    一.前言 许久之后终于可以继续我的ASP.NET MVC连载了,之前我们全面的讲述了路由相关的知识,下面我们将开始控制器和动作的讲解. ASP.NET MVC学习之路由篇幅(1) ASP.NET MV ...

  6. ASP.NET Core学习资源汇总

    ASP.NET Core入门学习资源汇总篇幅比較長,分为七个部分. (一)认识.NET Core (二)Vistual Studio安装.调试 (三)Asp.Net Core入门指南与学习路线 (四) ...

  7. asp.net2.0学习历程 菜鸟到中级程序员的飞跃[z转]

    asp.net2.0学习历程 菜鸟到中级程序员的飞跃 --30本好书点评 学历历程 如果你是一个菜鸟或者自认为初学者那么本文非常适合你: 不能说这30本书就是最佳组合,但是可以说这个组合不差: 本人曾 ...

  8. ASP.NET在线学习系统

    学无止境,所以人这一辈子是一个不断学习的过程,但是传统的学习方式都是在课题上进行学习,但是课题上学习的知识都是有限的,所以如何能够通过互联网进行在线学习是很多人梦寐以求的事情,但是随着互联网的发展这一 ...

  9. (转)ASP.NET MVC 学习第一天

    天道酬勤0322 博客园 | 首页 | 发新随笔 | 发新文章 | 联系 | 订阅  | 管理 随笔:10 文章:0 评论:9 引用:0 ASP.NET MVC 学习第一天 今天开始第一天学习asp. ...

  10. asp.net2.0学习历程 菜鸟到中级程序员的飞跃 转载

    asp.net2.0学习历程 菜鸟到中级程序员的飞跃 --30本好书点评 主页:http://blog.csdn.net/21aspnet/           时间:2007.5.16 学历历程 如 ...

最新文章

  1. Git探秘:实用主义(1/2)
  2. boost::regex模块基于 ftp 的 regex_match 示例
  3. mac os11以下安装Xcode
  4. Maven的依赖范围
  5. 19、深入理解计算机系统笔记,虚拟存储器,基本原理(1)
  6. PE 文件格式 详解 一
  7. CubeMX创建stm32项目及遇到的问题
  8. python简单程序实例-python简单实例训练(21~30)
  9. CentOS7---iptables
  10. 什么是多态,多态的实现方法是什么?
  11. oracle 错误 1013,ORA-03113错误解决一例
  12. 新款任天堂Switch游戏机底座专用解决方案
  13. 机器学习聚类算法:DBSCAN 对鸢尾花数据分类 C++实现
  14. JVM MAT分析器中的shallow heap 和 retained heap详解
  15. speedoffice(Word)怎么修改纸张方向
  16. AGV搬运机器人磁导航传感器D-MNSV7-X16安装方法与注意事项
  17. Android的增量更新
  18. ZYNQ ARM核之SCU
  19. 信息图形领域的普利策奖-Malofiej Award(马洛菲杰奖)
  20. Jmeter参数化实现永久递增

热门文章

  1. pandas数据处理、绘图
  2. 城市不透水面空间分析——以宁波为例
  3. 记录uluuuuuuu
  4. Flutter实战之底部导航栏 BottomNavigation
  5. Myeclipse打包生成jar文件 A exception has Occured问题解决
  6. python terminal_一个简单、易用的Python命令行(terminal)进度条库
  7. python加入小学课本_Python走进小学教材
  8. 全国计算机一级考试难度高吗,计算机等级考试分几级 考试难度大不大
  9. python中的赋值运算符_整理Python中的赋值运算符
  10. 路由器刷breed web控制台助手_红米AC2100路由器从零认证登录SCUT校园网踩坑经历...