using System;
using System.Web;
namespace CodingStrategies {
class SimpleModule : IHttpModule {
public void Init(HttpApplication application) {
application.BeginRequest += new EventHandler(this.Application_BeginRequest);
}
public void Dispose() {
}
public void Application_BeginRequest(object source, EventArgs e) {
HttpApplication application = (HttpApplication)source;
application.Context.Response.Write("a module can end the request");
application.Context.Response.End();
}
}
}
|