csc /target:library /reference:System.dll,System.Web.dll /out:CodingStrategies.dll SimpleModule.cs : DLL « Development « ASP.NET Tutorial






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();
      }
    
    }

}








9.13.DLL
9.13.1.csc /target:library /reference:System.dll,System.Web.dll /out:CodingStrategies.dll SimpleModule.cs