Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where the methods of Global.asax come from?

When I add Global.asax to the page, five methods (Application_Start,Session_Start,...) are added to the page automatically. But where they come from ? I looked at the application class and its interfaces but I couldnt find them at all.

Thanks in advance,

like image 537
Barış Velioğlu Avatar asked Jun 17 '11 13:06

Barış Velioğlu


1 Answers

These methods don't come from anywhere, they exist only on your class. However, the ASP.NET runtime looks for methods in your class with these names and calls them at appropriate times in the application/page lifecycle.

like image 53
John Bledsoe Avatar answered Nov 11 '22 16:11

John Bledsoe