天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

asp.net Coolite 學(xué)習(xí)交流

Coolite Toolkit
簡介
Coolite Toolkit 是一個(gè)支持ASP.NET AJAX的Web控件。
Coolite Toolkit是基于跨瀏覽器的ExtJS 庫開發(fā)而來的,并且簡化了開發(fā)步驟,并且包含有豐富的Ajax運(yùn)用。
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 的朋友打一下預(yù)防針-- 很多人都知道extjs控件又大又慢,但因?yàn)樗缑婷烙^,ajax+json操作簡單方便,因此作為企業(yè)應(yīng)用還是不錯(cuò)的選擇。而Coolite基于extjs,因此無可避免也是繼承這個(gè)缺點(diǎn)(我現(xiàn)在用的0.7版本的dll有6M多)。但是用了Coolite,你就可以省掉一大串那樣管理的js代碼了,界面完全可以用它來簡單配置就得到很cool的效果,js只是作為少量的客戶端操作。


Coolite最大不足是:還是開發(fā)階段,bug不少。


廢話少說,給你一個(gè)簡單的ajax例子,你就明白為什么我喜歡它了:


1. AjaxEvet:

//這是一個(gè)服務(wù)端方法

  protected void UpdateTimeStamp(object sender, AjaxEventArgs e)
{
this.SetTime();
}

//Html 調(diào)用上述方法
<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" 就是指點(diǎn)擊按鈕后調(diào)用服務(wù)端方法UpdateTimeStamp 來更新某個(gè)標(biāo)簽的時(shí)間

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的人基本都會(huì)漏掉配置這一至關(guān)重要的環(huán)節(jié)。

如果想開啟ajax事件,請(qǐng)記得在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>


官方關(guān)于配置的詳細(xì)說明文件:


   
--------------------------------------------------------------------------
                         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>

AspNet技術(shù)asp.net Coolite 學(xué)習(xí)交流,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 偷上邻居熟睡少妇 | 精品无码三级在线观看视频 | 韩国演艺圈悲惨在线 | 蜜臀亚洲AV永久无码精品老司机 | 国产一区二区高清 | 久久精品视频uu | 欧美日韩中文国产一区发布 | 国产亚洲精品字幕在线观看 | 伊人久久综合网站 | 国产人妻系列无码专区97SS | 亚洲色综合狠狠综合区 | 琪琪电影午夜理论片77网 | 黑人巨茎大战白人女40CMO | 好男人在线高清WWW免费观看 | 久久99AV无色码人妻蜜 | 免费在线看视频 | 波野结衣qvod | 成人无码精品一区二区在线观看 | 果冻传媒最新视频在线观看 | 寂寞骚妇女被后入式抽插 | 粉嫩无套白浆第一次jk | 超碰免费视频caoporn | 国产情侣真实露脸在线 | 岛国大片在线观看完整版 | 97超级碰碰人妻中文字幕 | 亚洲合集综合久久性色 | 俄罗斯极品hd | 亚洲.日韩.欧美另类 | 熟女人妻水多爽中文字幕 | 97精品一区二区视频在线观看 | 国产AV白丝爆浆在线播放 | 蜜芽丅v新网站在线观看 | 99爱在线观看精品视频 | 免费夜色污私人影院网站 | 亚洲国产成人在线视频 | 我们日本在线观看免费动漫下载 | 亚洲精品国产A久久久久久 亚洲精品国产AV成人毛片 | 正在播放黑人杂交派对卧槽 | 韩国电影real在线观看完整版 | 美女张开腿露尿口给男人亲 | 男人吃奶摸下弄进去好爽 |