public class ClshttpModule:IHttpModule { private HttpApplication httpapp; public static ArrayList objarlist = new ArrayList(); public ClshttpModule() { } public void Dispose() { } public void Init(HttpApplication context) { this.httpapp = context; httpapp.Context.Response.Clear(); objarlist.Clear(); objarlist.Add("httpModule:init"); httpapp.AuthenticateRequest += new EventHandler(OnAuthentication); httpapp.AuthenticateRequest += new EventHandler(OnAuthorization); httpapp.BeginRequest += new EventHandler(OnBeginrequest); httpapp.EndRequest += new EventHandler(OnEndrequest); httpapp.ResolveRequestCache += new EventHandler(OnResolveRequestCache); httpapp.AcquireRequestState += new EventHandler(OnAcquireRequest); httpapp.PreRequestHandlerExecute += new EventHandler(PreRequestHandlerExecute); httpapp.PostRequestHandlerExecute += new EventHandler(PostRequestHandlerExecute); httpapp.ReleaseRequestState += new EventHandler(ReleaseRequestState); httpapp.UpdateRequestCache += new EventHandler(UpdateRequestCachee); } void UpdateRequestCachee(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void ReleaseRequestState(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void PostRequestHandlerExecute(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void PreRequestHandlerExecute(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void PreRequestHandlerExecuteOnAcquireRequest(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void OnAcquireRequest(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void OnResolveRequestCache(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void OnEndrequest(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void OnBeginrequest(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void OnAuthorization(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } void OnAuthentication(object sender, EventArgs e) { objarlist.Add("httpModule:OnupdateCache"); } }
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
<httpModules> <add name="ClshttpModule" type="ClshttpModule"/> </httpModules> <httpHandlers> <add verb="*" path="*.jpg" type="clsHttpHandler"/> </httpHandlers>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)