using System; using System.Collections.Generic; using System.Linq; using System.Web; /// /// Summary description for OmaMoodul /// /// namespace Moodulid { public class OmaMoodul2 : IHttpModule { public OmaMoodul2() { // // TODO: Add constructor logic here // } #region IHttpModule Members public void Dispose() { } public void Init(HttpApplication context) { context.BeginRequest += new EventHandler(context_BeginRequest); context.EndRequest += new EventHandler(context_EndRequest); } void context_EndRequest(object sender, EventArgs e) { HttpApplication app = sender as HttpApplication; HttpContext cx = app.Context as HttpContext; cx.Response.Write("
Oma HTTP moodul2: Lõppeb request
"); } void context_BeginRequest(object sender, EventArgs e) { HttpApplication app = sender as HttpApplication; HttpContext cx = app.Context as HttpContext; cx.Response.Write("
Oma HTTP moodul2: Algab request
"); } #endregion } }