468,505 Members | 1,589 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

global.asax or global.ascx?

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)
{...}
}
Nov 19 '05 #1
5 3958
..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.
"Daves" <db****@simnet.is> wrote in message
news:ek******************@TK2MSFTNGP09.phx.gbl...
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)
{...}
}

Nov 19 '05 #2
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
"Daves" wrote:
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)
{...}
}

Nov 19 '05 #3
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.
"Alien2_51" <da***************@monacocoach.removeme.com> wrote in message
news:C2**********************************@microsof t.com...
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
"Daves" wrote:
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)
{...}
}

Nov 19 '05 #4
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...
"Scott M." wrote:
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.
"Alien2_51" <da***************@monacocoach.removeme.com> wrote in message
news:C2**********************************@microsof t.com...
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
"Daves" wrote:
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)
{...}
}


Nov 19 '05 #5
Yes, I know that. But, Global.asax is considered part of the project and is
shown by default without having to "un-hide" it.
"Alien2_51" <da***************@monacocoach.removeme.com> wrote in message
news:D6**********************************@microsof t.com...
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...
"Scott M." wrote:
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.
"Alien2_51" <da***************@monacocoach.removeme.com> wrote in message
news:C2**********************************@microsof t.com...
> 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
>
>
> "Daves" wrote:
>
>> 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)
>> {...}
>> }
>>
>>
>>


Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by martin | last post: by
3 posts views Thread by Robert Walter | last post: by
1 post views Thread by Asha | last post: by
6 posts views Thread by fd123456 | last post: by
7 posts views Thread by Ankit Aneja | last post: by
7 posts views Thread by Jonas | last post: by
1 post views Thread by ttt.tas | last post: by
8 posts views Thread by Rob T | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.