O'Reilly logo

C#® Developer's Guide to ASP.NET, XML, and ADO.NET by Chris Kinsman, Jeffrey P. McManus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Initializing Web Applications Using Global.asax

ASP.old provided a file, global.asa, that provided functionality specific to the ASP application and session. You would typically put initialization code in global.asa, which provided a set of event-handling procedures for this purpose.

ASP.NET provides a similar functionality in the file Global.asax. Four categories of entries can appear in a Global.asax file:

  • Application directives

  • Code declaration blocks

  • Server-side object tags

  • Server-side includes

Each of these four categories of entries is discussed in more detail in the next few sections.

Note that when you make a change to Global.asax, as with all ASP.NET files, the binary representation of the script will be automatically recompiled. This isn't ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required