Tuesday, June 06, 2006

Milan Negovan: Session_Start or Session_OnStart (event handlers in global.asax)

itt van a teljes cikk.

What if you define the following methods in global.asax (yes, all of them):

  • void Session_Start(object sender, EventArgs e)
  • void Session_Start()
  • void Session_OnStart(object sender, EventArgs e)
  • void Session_OnStart()
  • void Session_Start(object sender)

Having these five event handlers, which one(s) will be called?

It turns out all of them, except the last one, will be called, and in the same order as listed!