C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

Global.asax is necessary for application . what is the necessasity of that. explain clearl


Posted Date: 09 Jul 2008      Posted By: samul      Member Level: Gold     Points: 1   Responses: 2



Global.asax is necessary for application . what is the necessasity of that. explain clearl




Responses

Author: sivangari    09 Jul 2008Member Level: GoldRating: 2 out of 52 out of 5     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 2008Member Level: GoldRating: 2 out of 52 out of 5     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.



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : what is the difference between Delete and Truncate. explain with an example.
Previous : Explain about DataHiding.
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use