By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,994 Members | 2,073 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,994 IT Pros & Developers. It's quick & easy.

ASP.NET 2005 : where is Global.asax ?

P: n/a
I installed VS05 RC , created a new Web Site , but I do not see Global.asax
, and I do not see Global.asax.cs in the App_Code dir ......
Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
A global.asax is not created by default.

Select "File", "New", "File", and select "Global Application Class"
from the templates.

Or, right-click the website's name in the Solution Explorer and select
"Add new item" and select "Global Application Class" from the templates.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:eL**************@TK2MSFTNGP14.phx.gbl...
I installed VS05 RC , created a new Web Site , but I do not see Global.asax , and I do
not see Global.asax.cs in the App_Code dir ......

Nov 19 '05 #2

P: n/a
Ok. I was able to do that. But apparently Global.asax.cs no longer exists
.... the various methods ( Application_Start , etc. ) instead show inline in
Global.asax ...

Why did they do this ?
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
A global.asax is not created by default.

Select "File", "New", "File", and select "Global Application Class"
from the templates.

Or, right-click the website's name in the Solution Explorer and select
"Add new item" and select "Global Application Class" from the templates.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:eL**************@TK2MSFTNGP14.phx.gbl...
I installed VS05 RC , created a new Web Site , but I do not see
Global.asax , and I do not see Global.asax.cs in the App_Code dir ......


Nov 19 '05 #3

P: n/a
I guess they figure that, since global.asax doesn't have a UI,
writing the code inline in global.asax saves the extra step involved
in writing code into a codebehind file.

The purpose of codebehind is to separate code from UI.
Since global.asax has no UI, it doesn't need to have codebehind.

You can do anything you want inline in global.asax
that you could do in previous incarnations of codebehind global.asax.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:O%****************@TK2MSFTNGP10.phx.gbl...
Ok. I was able to do that. But apparently Global.asax.cs no longer exists ... the
various methods ( Application_Start , etc. ) instead show inline in Global.asax ...

Why did they do this ?
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
A global.asax is not created by default.

Select "File", "New", "File", and select "Global Application Class"
from the templates.

Or, right-click the website's name in the Solution Explorer and select
"Add new item" and select "Global Application Class" from the templates.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:eL**************@TK2MSFTNGP14.phx.gbl...
I installed VS05 RC , created a new Web Site , but I do not see Global.asax , and I do
not see Global.asax.cs in the App_Code dir ......



Nov 19 '05 #4

P: n/a
because asp.net compiles all the source code now, not VS, so the extra file
is not required.

-- bruce (sqlwork.com)
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:O%****************@TK2MSFTNGP10.phx.gbl...
Ok. I was able to do that. But apparently Global.asax.cs no longer exists
... the various methods ( Application_Start , etc. ) instead show inline
in Global.asax ...

Why did they do this ?
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
A global.asax is not created by default.

Select "File", "New", "File", and select "Global Application Class"
from the templates.

Or, right-click the website's name in the Solution Explorer and select
"Add new item" and select "Global Application Class" from the templates.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:eL**************@TK2MSFTNGP14.phx.gbl...
I installed VS05 RC , created a new Web Site , but I do not see
Global.asax , and I do not see Global.asax.cs in the App_Code dir ......



Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.