How Global.asax Works?

1.3k views Asked by At

in global.asax , how these events

   Application_Start
   Application_End
   Session_Start
   Session_End
   Application_BeginRequest
   Application_AuthenticateRequest
   Application_Error

hooked up to the corresponding eventhandler in System.Web.HttpApplication class

thanks !

Edit: maybe this is what i want link

1

There are 1 answers

0
moribvndvs On BEST ANSWER

When ASP.NET starts up your application, it creates an instance of your application's HttpApplication implementation, which is represented by Global.asax. It then uses reflection to look for methods named appropriately with the correct parameters, that match each of the events. Those it finds, it attaches as event handlers automatically for you.