Thanks Wenfeng!! I hope I can use this to implement some security feature and shouldn't be a security threat to the application if the code logic is fine.
Thanks anyway, Sujay -----Original Message----- From: Wenfeng Gao [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2003 9:51 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Catching events in HTTP Module If your button is a server control, then you can find it out as follows. public IAsyncResult BeginPreRequestHandlerExecute(Object sender, EventArgs e, AsyncCallback cb, Object extraData) if (Request.Url.AbsolutePath == "/MyWebApp/WebForm1.aspx") if(Request.RequestType == "POST") for (int i = 0; i < Request.Form.Keys.Count; i++) if(Request.Form.Keys[i] == "Button1") // Button1 is the ID of the button control // Get the request data else // handle other control events else // Handle the GET request else // Handle other pages Wenfeng Sujay Suresh Maheshwari <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent by: "Moderated cc: discussion of advanced .NET Subject: [ADVANCED-DOTNET] Catching events in HTTP Module topics." <[EMAIL PROTECTED] VELOP.COM> 08/22/2003 05:35 AM Please respond to "Moderated discussion of advanced .NET topics." Hi Group, I have written a HttpModule and I am calling a method on context.PreRequestHandlerExecute Now this method will be called on all page load. Can I know the event which called this page load. Rather if a user presses an Add button, can I know that an add button is clicked. May be not in this method, but can I know the event which is generated before actually the event function in my code behind gets called. Basically I want a centralized method which is called throughout application before actually the code behind code getting executed. And I don't want to called this method everywhere in my code behind pages. Regards, Sujay =================================== This list is hosted by DevelopMentor(r) http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor(r) http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor� http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
