Automatic event posting in Global.asax

I am wondering if there is a way to automatically silence Global.asax event handlers? Until now, I could not find examples of how to do this. It seems I just need to find the list of delegate names available to me and print them manually.

Intellisense does not seem to provide any useful information on this.

+5
source share
4 answers

The ASP.Net runtime uses the dynamic method search function with names like "Application_Start", "Session_Start", etc., and then binds to the corresponding events of the HttpApplication class. You can effectively bind to any of the HttpApplication events by simply including the method in Global.asax.cs, whose name is "Application_" and then the name of the event. For example, to use the EndRequest event, add it to the Global.asax.cs file:

    protected void Application_EndRequest(object sender, EventArgs e)
    {
        // Your code here
    }

See Rick Strall's blog post for tons of helpful information on how to do this.

+7
source

All class events HttpApplicationcan have a handler in global.asax.

+2
source

, " " ? "" Intellisense, , ? , ...

, , avaialble, :

, : - (

0

HttpApplication.Init , Init , , HttpModule HttpApplication.

asax - name, Web.config, .

0

All Articles