我爱Aspx >> Asp.Net >> Asp.Net中的HttpModuleHttpResponse Response=Application.Context.Response;
Response.Write("<h1>Beginning of Request</h1><hr>" );
}
private void Application_EndRequest(Object source, EventArgs e)
{
HttpApplication application = (HttpApplication)source;
HttpResponse Response=Application.Context.Response;
Response.Write("<h1>End of Request</h1><hr>" );
}
public void Dispose()
{
}
}
}
MyModule类实现了IhttpModule接口。在Init方法中,指明了实现BeginRequest 和EndRequest 事件的方法。
下面,在Web.config文件中注册这个类,就可以使用这个HttpModule了,注册的方法如下:
Ҷƪл˵?
Asp.Net中的HttpHandler[04-21]
Asp.Net 动态生成验证码[04-21]
推荐一些ASP.NET 2.0相关的技术资..[04-21]
在Asp.Net中动态加载控件(用户控..[04-21]
C#.NET中的命名规则详细介绍[04-21]
ASP.NET 2.0下配置FCKeditor[04-21]
ASP.NET 2.0加密网站配置文件中的..[04-21]
ASP.NET中自动给URL地址加上超链..[04-21]
ASP.NET 2.0 数据绑定高级技巧[04-21]
用ASP列出目录及文件[04-21]
Asp.Net中的HttpHandler[04-21]
Asp.Net 动态生成验证码[04-21]
用C#压缩和修复Access数据库[04-21]
推荐一些ASP.NET 2.0相关的技术资..[04-21]
在Asp.Net中动态加载控件(用户控..[04-21]
C#.NET中的命名规则详细介绍[04-21]
ASP.NET 2.0下配置FCKeditor[04-21]
ASP.NET 2.0加密网站配置文件中的..[04-21]
ASP.NET中自动给URL地址加上超链..[04-21]
ASP.NET 2.0 数据绑定高级技巧[04-21]