Hello, I'm trying to find out if there is some sort of global page_request method. I am writing some logging software for some old asp.net applications and I would like to include the new logging functionality in each page request. However, I do not want
to have to recode every page. Ideally, I would like to add a single method that gets called before (or after) every single page request. I do not want to change the functionality of each page other than adding this logging functionality.
How about writing custom HttpModule for logging? You will not have to modify your existing code and the same module can be reused across multiple projects, please refer
this thread.
None
0 Points
1 Post
Global page_request method?
Aug 24, 2009 03:19 PM|azbtr|LINK
Hello, I'm trying to find out if there is some sort of global page_request method. I am writing some logging software for some old asp.net applications and I would like to include the new logging functionality in each page request. However, I do not want to have to recode every page. Ideally, I would like to add a single method that gets called before (or after) every single page request. I do not want to change the functionality of each page other than adding this logging functionality.
All-Star
124328 Points
10142 Posts
Re: Global page_request method?
Aug 24, 2009 03:25 PM|SGWellens|LINK
You can use a global.asax file:
My blog
Member
191 Points
63 Posts
Re: Global page_request method?
Aug 25, 2009 02:00 AM|raxitr|LINK
How about writing custom HttpModule for logging? You will not have to modify your existing code and the same module can be reused across multiple projects, please refer this thread.