zoukankan      html  css  js  c++  java
  • AjaxPro 框架学习 (支持vs2003/vs2005)

    AjaxPro 相关资类
    Web配制

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <system.web>
        <httpHandlers>
          <add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
        </httpHandlers>

      </system.web>
    </configuration>

    方法

     [AjaxPro.AjaxMethod]
    public DateTime GetServerTime()
    {
      return DateTime.Now;
    }

    页面CS

    namespace MyDemo
    {
      public class _Default
      {
        protected void Page_Load(object sender, EventArgs e)
        {
          AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default));
        }

        [AjaxPro.AjaxMethod]
        public DateTime GetServerTime()
        {
          return DateTime.Now;
        }
      }
    }

    页面aspx

    function getServerTime()
    {
    MyDemo._Default.GetServerTime(getServerTime_callback);  // asynchronous call
    }
    // This method will be called after the method has been executed
    // and the result has been sent to the client.
    function getServerTime_callback(res)
    {
    alert(res.value);
    }
    简单吧!可以支持vs2003/vs2005
     
  • 相关阅读:
    MinGW离线包下载地址
    词法分析器--DFA(c++实现)
    linux下shell统计文件目录下所有代码行数
    四则运算表达式
    BliBli抢楼全攻略
    python 电影下载链接爬虫
    in, out, ref
    联合查询
    SQL语句大全
    LINQ
  • 原文地址:https://www.cnblogs.com/sgciviolence/p/1263277.html
Copyright © 2011-2022 走看看