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

推荐订阅源

Help Net Security
Help Net Security
S
SegmentFault 最新的问题
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
C
Check Point Blog
M
MIT News - Artificial intelligence
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
U
Unit 42
D
Docker
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
H
Help Net Security
D
DataBreaches.Net
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
Cloudbric
Cloudbric
Blog — PlanetScale
Blog — PlanetScale
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Troy Hunt's Blog
N
News | PayPal Newsroom
V2EX - 技术
V2EX - 技术
H
Heimdal Security Blog
S
Security @ Cisco Blogs
V
Visual Studio Blog
The Last Watchdog
The Last Watchdog
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
C
Cyber Attacks, Cyber Crime and Cyber Security
Last Week in AI
Last Week in AI
爱范儿
爱范儿
博客园 - 聂微东
S
Securelist
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
Cisco Talos Blog
Cisco Talos Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Vulnerabilities – Threatpost
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
O
OpenAI News
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - 默默無語中

类与结构的区别 GridView分页-编辑-删除 DataList修改删除 - 默默無語中 - 博客园 弄了一晚上研究连接字符串,给自己留个清楚的回忆~! - 默默無語中 - 博客园 [数据库连接字符串] SQL Server 2005 Compact Edition 连接字符串 委托对象(收集) 委托的笔记(整理) [导入]asp.net高级教程(三)-实战篇 [导入]asp.net高级教程(三)-对象 [导入]asp.net高级教程(五)-实战篇(中) [导入].NET之ASPWebApplication快速入门(3) [导入].NET之ASPWebApplication快速入门(2) [导入].NET之ASPWebApplication快速入门(1) [导入].NET之ASPWebApplication快速入门(4) [导入]asp.NET特写 [导入]亲密接触ASP.Net(1) [导入]亲密接触ASP.Net(3) [导入]亲密接触ASP.Net(4) [导入]亲密接触ASP.Net(2) [导入]亲密接触ASP.Net(6) [导入]亲密接触ASP.Net(5)
[导入].NET之ASPWebApplication快速入门(5)
默默無語中 · 2008-04-24 · via 博客园 - 默默無語中

(5) 
创建自定义HttpHandler

要自定义一个handler,可以执行IhttpHandler,并在config.web文件的httphandlers一节中添加类信息。下面举例说明如何创建自定义一个HttpHandler,将所有的请求对应到"SimpleHandler.aspx"中:

SimpleHandler

[]点击运行程序]
| []查看源代码]

自定义HttpHandler可以通过执行IhttpHandler接口来创建,这个接口只有两个方法。通过调用IsReusable,一个HTTP
factory就能够查询handler(处理器)以判断是否同一实例可以用于服务多个请求。ProcessRequest方法接受HttpContext实例作为参数。这里的例子中,请求数据被忽略,一个常量字符串作为响应发送到客户端。请看下面使用VB、C#以及JScript三种语言编写的代码:

C#<
文章来源:http://blog.csdn.net/zgqtxwd/archive/2008/04/24/2320012.aspx