asp.net Coolite Learning Exchange _ practical skills

Source: Internet
Author: User
Tags documentation

Coolite Toolkit
Brief introduction
Coolite Toolkit is a Web control that supports ASP.net ajax.
The Coolite Toolkit is developed based on a cross-browser ExtJS Library and simplifies the development process and contains rich AJAX usage.
Coolite Toolkit and ExtJS are open source.
Official homepage:http://coolite.com
Download Address: Http://coolite.com/download
Samples: http://examples.coolite.com


and I set up a group in Cnblogs, with Cnblogs to join: http://space.cnblogs.com/group/coolite/ (CSDN admin don't kick me-.) -!)


Besides, I recently joined the Q Group to discuss Coolite: 86399374


First for those who have not used ExtJS or coolite friends to hit the needle-many people know that the ExtJS control is large and slow, but because of its beautiful interface, Ajax+json easy to operate, so as an enterprise application is still a good choice. And Coolite is based on ExtJS, so it is inevitable to inherit this shortcoming (I now use the 0.7 version of the DLL has more than 6M). But with the Coolite, you can save a large number of such management of the JS code, the interface can be used to simply configure it to get very cool effect, JS just as a small amount of client operations.


Coolite The biggest problem is: or development phase, a lot of bugs.


Less nonsense, give you a simple Ajax example, you can see why I like it:


1. Ajaxevet:

This is a service-side method

   protected void Updatetimestamp (object sender, Ajaxeventargs e) 
{
this. SetTime ();
}

//html calls the above method
" ext: button id= " Button1 " runat= " server " text= " click Me
ajaxevents "
Click onevent= "Updatetimestamp"
eventmask showmask= "true" mindelay= " msg= updating TimeStamp ..." />
</ Click "
</ ajaxevents "
</ Ext: Button

Onevent=  is the time to update a label by calling the server-side method Updatetimestamp 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>

The first time to use Coolite people will basically miss the configuration of this vital link.

If you want to turn on Ajax events, remember to make the following configuration in Web.config:


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


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


<modules>
<!--Coolite config-->
<add name= "Ajaxrequestmodule" precondition= managedhandler "type=" Coolite.Ext.Web.AjaxRequestModule, Coolite.Ext.Web "/>
</modules>


<!--Coolite config-->
<add name= "Ajaxrequesthandler" verb= "*" path= "*/coolite.axd" "precondition=" Integratedmode "type=" Coolite.Ext.Web.ResourceManager "/>


Official detailed documentation on configuration:



--------------------------------------------------------------------------
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 would output configuration script to the Clien T.
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 of the Ajax method.
Default is ' default '. Options include [default| include| Ignore]

Ajaxviewstatemode:viewstatemode
Specifies whether the ViewState should is returned and updated on the client during a 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 URLs so they look presentable.
Default is ' true '. Options include [True|false]

Clientinitajaxmethods:boolean
Specifies whether Server-side Methods marked with the [Ajaxmethod] attribute would output configuration script to the Clien T.
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".
The Default is true. Options include [True|false]

Scriptadapter:string
Gets or Sets the current script Adapter.
The 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.
The Default is Embedded. Options include [embedded| file| None]

Renderstyles:resourcelocationtype
Whether to have the Coolite controls output the required StyleSheet or not.
Gives developer option of manually including required <link> or <style> files.
The Default is Embedded. Options include [embedded| file| None]

Resourcepath:string
Gets the prefix of the URL path to the base ~/coolite/folder containing.
The path can be absolute or relative.

Scriptmode:scriptmode
Whether to include the "release" (condensed) or Debug (with inline documentation) EXT JavaScript files.
The Default is ' release '. Options include [release| Debug]

Sourceformatting:boolean
Specifies whether the scripts rendered to the page should is 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.
The default is "default". Options include [default| gray| Slate]

Quicktips:boolean
Specifies whether to render the quicktips. Provides attractive and customizable tooltips for the any element.
Default is ' true '. Options include [True|false]
-->

<coolite theme= "Default"/>


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


<!--
The system.webserver section are required for running ASP.net AJAX under Internet information Services 7.0.
It is isn't 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>
<add name= "Ajaxrequesthandler" verb= "*" path= "*/coolite.axd" "precondition=" Integratedmode "type=" Coolite.Ext.Web.ResourceManager "/>
</system.webServer>
</configuration>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.