httpModule VS Page_Load (ASP.NET C# Web App)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dixonjm
    New Member
    • Jun 2007
    • 32

    #1

    httpModule VS Page_Load (ASP.NET C# Web App)

    HI,

    I have to make a call to a central stand alone class, which will write auditing data to the database.

    I was wondering which would be the quickest way; either from a httpModule or via the Page_load event of our master pages?

    Please can any one advise, as I cant seem to find any answers on the web

    many thanks
    Janet
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    My opinion is use page_load. HTTP modules are .NET components that implement the System.Web.IHtt pModule interface. These components plug themselves into the ASP.NET request processing pipeline by registering themselves for certain events. Whenever those events occur, ASP.NET invokes the interested HTTP modules so that the modules can play with the request.

    Remember we have always got the events in global.asax to play with. I don't see any reason to support httpmodule for what you want to do.

    Comment

    Working...