| Author: sivangari 09 Jul 2008 | Member Level: Gold | Rating:  Points: 6 |
hi, Global.asax is a file that resides in the root directory of your application. It is inaccessible over the web but is used by the ASP.NET application if it is there. It is a collection of event handlers that you can use to change and set settings in your site. The events can come from one of two places - The HTTPApplication object and any HTTPModule object that is specified in web.confg or machine.config. We will be covering both here.
In Global.asax there are a lot more events to work with (and you can create your own) than there are in global.asa which gives you a lot more customization when it comes to your application.
|
| Author: chandramohan 09 Jul 2008 | Member Level: Gold | Rating:  Points: 1 |
In addition to writing UI code, developers can also add application level logic and event handling code into their Web applications. This code does not handle generating UI and is typically not invoked in response to individual page requests. Instead, it is responsible for handling higher-level application events such as Application_Start, Application_End, Session_Start, Session_End, and so on. Developers author this logic using a Global.asax file located at the root of a particular Web application's virtual directory tree. ASP.NET automatically parses and compiles this file into a dynamic .NET Framework class--which extends the HttpApplication base class--the first time any resource or URL within the application namespace is activated or requested.
The Global.asax file is parsed and dynamically compiled by ASP.NET into a .NET Framework class the first time any resource or URL within its application namespace is activated or requested. The Global.asax file is configured to automatically reject any direct URL request so that external users cannot download or view the code within.
Application or Session-Scoped Events
Developers can define handlers for events of the HttpApplication base class by authoring methods in the Global.asax file that conform to the naming pattern "Application_EventName(AppropriateEventArgumentSignature)".
------------
Global.asax is a file that resides in the root directory of your application. It is inaccessible over the web but is used by the ASP.NET application if it is there. It is a collection of event handlers that you can use to change and set settings in your site. The events can come from one of two places - The HTTPApplication object and any HTTPModule object that is specified in web.confg or machine.config. We will be covering both here.
In Global.asax there are a lot more events to work with (and you can create your own) than there are in global.asa which gives you a lot more customization when it comes to your application.
|