global.asax or global.ascx?

  • Thread starter Thread starter Daves
  • Start date Start date
D

Daves

emm... what exactly is the difference?!
If I want a global file without <script></script> tags could I use
global.ascx only like

class Global
{
void Session_Start(Object sender, EventArgs e)
{...}
}
 
..ascx denotes a User Control and this file is not automatically looked at
the moment your application starts or ends or when a session begins or ends.
..asax denotes the Global Application File and this file is automatically
checked for event handlers during several different events by IIS.
 
global.asax.vb is the file that actually contains application and session
event handlers. You can see this file from VS.IDE by clicking the "Show All
Files" icon in the upper section of the Solution Explorer
 
In VB.NET, you don't need to "un-hide" the file in the Solution Explorer, it
is a part of the project and is shown all the time. I suspect this is the
case in C# as well.
 
The "Show All Files" toggles whether or not you can see files in the project
directory which are not part of the project and adds the "+" and "-" controls
to the project files in the solution explorer so you can see the code behind
and resource files...
 
Yes, I know that. But, Global.asax is considered part of the project and is
shown by default without having to "un-hide" it.
 
Back
Top