The Global.asx file is an optional file that contains code for responding to application level events raised by ASP.NET. This file is also called as ASP.NET application file. This file resides in the root directory of an application. If we are not defining this file in application, the ASP.NET page framework assumes that you have not defined any applicationa/Session events in the application.
Followign are the list of events handled in the global.asax file.
Event: Application_Start
When an application starts. This event occurs only one time in an application’s life cycle. It occurs again when you restart the application. It’s the best place to count number of visitors.
Event: Application_End
This event occurs when application ends.
Event: Session_Start
This event occurs whenever a new session starts. This is the best place to count user sessions for an application
Practical Usage: Setting user specific values, caching items based upon user context.
Event: Session_End
This event Opposite of the previous event.
Event: Application_Error
This event occurs when an unhandled error or exception occurs in an application.
Event: Application_BeginRequest
This event occurs every time when server makes a request. This event may occur multiple times in an applications life cycle.
.NET Framework 4.0 On of the .NET Framework 4.0 beta was made available with experimental software transactional memory support. Whether this functionality will be available in the final version of…
Regular Expression in ASP.net ASP.NET provides you some handfull validation controls like RequiredFiledValidator, RegularExpressionValidator etc. Most of the time we have to check whether user has given the…
Collection Classes ASP.Net C# The .NET Framework provides specialized classes for data storage and retrieval. These classes provide support for stacks, queues, lists, and hash tables. Most collection classes…
Assembly Tutorial in ASP.Net C# The new basic entity is called an Assembly. This is a collection of class modules presented as a single DLL or EXE file. Even though EXE files can also be called assemblies, most…
Using the ASP.NET Parameter Object in ASP.Net The ASP.NET parameter object has the following properties:ConvertEmptyStringToNull : When true, if a parameter represents an empty string then the empty string is converted to the…
Processing Cycle of Requests in ASP.NET Architecture Event sequences Processing Cycle of Requests from IIS to handler:IIS gets the requestLooks up a script map extension and maps to aspnet_isapi.dllCode hits the worker process…