Introduction
Coolite Toolkit is a Web control that supports ASP. net ajax.
Coolite Toolkit is developed based on a cross-browser ExtJS library and simplifies the development steps and contains a wide range of Ajax applications.
Both Coolite Toolkit and ExtJS are open-source.
Official homepage: http://coolite.com
: Http://coolite.com/download
Samples: http://examples.coolite.com
And I set up a group in cnblogs, with cnblogs can join: http://space.cnblogs.com/group/coolite/ (csdn administrator don't kick me -. -!)
In addition, I recently joined the Q group discussing Coolite: 86399374
First, let's take a look at some friends who haven't used ExtJs or Coolite. Many people know that the extjs control is big and slow, but because of its beautiful interface, ajax + json is easy to operate, therefore, it is a good choice for enterprise applications. Coolite is based on extjs, so it is inevitable to inherit this shortcoming (I currently use more than 6 m dll versions in version 0.7 ). But with Coolite, you can save a bunch of js Code that is managed in that way, and the interface can be used for simple configuration to get cool results, js is only used as a small number of client operations.
The biggest disadvantage of Coolite is: there are many bugs in the development stage.
To put it bluntly, give you a simple ajax example and you will understand why I like it:
1. AjaxEvet:
// This is a server Method
Protected void UpdateTimeStamp (object sender, AjaxEventArgs e)
{
This. settime ();
}
// Call the preceding method in 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" refers to the time when the server method updatetimestamp is called to update a tag after the button is clicked.
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>
People who use coolite for the first time will basically miss this crucial part of configuration.
If you want to enable the ajax event, remember to make the following configuration in 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>
Official configuration instructions:
--------------------------------------------------------------------------
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 shoshould 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 between des 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 between des 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 shocould 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>