读书人

自定义HttpHandler处置类

发布时间: 2013-10-18 20:53:13 作者: rapoo

自定义HttpHandler处理类

1、创建自定义类型

2、继承IHttpHandler接口,并实现

3、配置Web.Config文件,注册类型

4、访问

$.ajax({           type: "POST",           url: "QuickMsgSatisticsHandler",           async : false,           data: { id : $(elem).attr('msgid')},           dataType: "text",           success: function(data,Status,XMLHttpRequest){                      },                    error: function(XMLHttpRequest, textStatus, errorThrown) {                        alert(errorThrown);                    }            });
优点,没有aspx那么笨重,速度有所提升,由于访问局限性,安全性加强。

读书人网 >编程

热点推荐