I think you are looking for the Application_BeginRequest event:
Called when an application request is received. This is the first event that fires for a request, which is often a page request (URL) that a user enters.
For more information on events, take a look at this article Working with the ASP.NET Global.asax File
source share