using
System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace James.HttpModules
... {
public class HttpModulesDemo:IHttpModule
...{
public void Dispose()
...{
}
public void Init(HttpApplication context)
...{
context.EndRequest+= new EventHandler(context_EndRequest);
}
public void context_EndRequest(object sender, EventArgs e)
...{
HttpApplication httpApp = (HttpApplication)sender;
httpApp.Response.Output.Write("<br />©2007 thinkCode FooterModule");
}
}
}
在web.config 里面配置
< configuration >
< system.web >
< httpModules >
< add name = " CopyRight " type = " James.HttpModules.HttpModulesDemo, James.HttpModules " />
</ httpModules >
</ system.web >
</ configuration >
James.HttpModules—命名空间
James.HttpModules.HttpModulesDemo 类
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace James.HttpModules
... {
public class HttpModulesDemo:IHttpModule
...{
public void Dispose()
...{
}
public void Init(HttpApplication context)
...{
context.EndRequest+= new EventHandler(context_EndRequest);
}
public void context_EndRequest(object sender, EventArgs e)
...{
HttpApplication httpApp = (HttpApplication)sender;
httpApp.Response.Output.Write("<br />©2007 thinkCode FooterModule");
}
}
}
在web.config 里面配置
< configuration >
< system.web >
< httpModules >
< add name = " CopyRight " type = " James.HttpModules.HttpModulesDemo, James.HttpModules " />
</ httpModules >
</ system.web >
</ configuration >
James.HttpModules—命名空间
James.HttpModules.HttpModulesDemo 类