惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

博客园 - heart-in-sky

查询效率分析 svn权限 为IIS服务器添加扩展 oracle 查询历史语句 VS自带混乱器 使用 StateServer 持久保存 Session 会话状态 ! VSS管理 oracle管理 C#操作服务器文件 服务器操作 iis发布网站,域名指向 关于软件开发和模块接口设计之一些思考 oracle数据库同步 WCF双工 Oracle常用的数据库字段类型 vs快捷键 对象数组与DataTable互换 C#网络编程 系统库设计说明书(数据库字典)
AjaxPro组件实现前后台数据无刷新交互 - heart-in-sky - 博客园
heart-in-sky · 2010-06-28 · via 博客园 - heart-in-sky

1、添加引用:AjaxPro.dll、Microsoft.AjaxCommon.dll。

2、web.config中加入:

  <httpHandlers>
      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      <add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro"/>
    </httpHandlers>

3、Page_Load中加入:

AjaxPro.Utility.RegisterTypeForAjax(this.GetType(), this);

4、前台JS:

  <script type="text/javascript">
        function sentMes()
        {
            var _objData  = new Object();
           
            var _arr = new Array();
               
            for(var i=1; i<6; i++ )
            {
                var _row = new Object();
                 
                _row.StudentName = i+"1";
                _row.BirthdayFrom = i+"2";
                _row.BirthdayTo = i+"3";
               
                _arr.push( _row );
            }
           
            _objData.StudentList = _arr;
          
          
            return _objData;
        }
        function Button1_onclick()
        {
            var _objParaList=new Array;
            _objParaList=sentMes()
         
            this.ASP.Defaultss.SelectPage(_objParaList,SelectCallback);
           
        }
        function SelectCallback( _asyncObject )
        {
            //get result object
            var _paginationData = _asyncObject.value;
           
            Label1.innerHTML=_paginationData;
        }
    </script>

5、后台代码:

  [AjaxPro.AjaxMethod]
    public string SelectPage(IJavaScriptObject _ajaxReceiveData)
    {

        DataTable al = new DataTable();
        try
        {
            //get converter
            ScriptData _scriptData = Microsoft.AjaxCommon.Converter.GetScriptData(_ajaxReceiveData);

            //get query parameters
            al = _scriptData.GetTable("StudentList", "table0");
        }
        catch (Exception _err)
        {
            _err.Message.ToString();
        }

        //return
        return "1";
    }