Visual Studio .NET - Global.asax file missing???

Asked By sarah lee on 02-Feb-07 08:28 AM

Hi all

I want to use global.asax in my application.

But when i tried to add with add new item, it is not in the list

why is this?

how can i get it?

thanks

global.asax - sundar k replied to sarah lee on 02-Feb-07 08:49 AM

To add a global.asax, (or web.config for that matter), simply right click the web site or web server project in your solution explorer, select Add New Item from the context menu and then choose Global Application Class (or Web Configuration File for a web.config).

have a look into the below link for related screeshots and some more info,

http://rossnelson.blogspot.com/2005/11/fixing-globalasax-in-aspnet-20.html


i have tried all that, but its not there - sarah lee replied to sundar k on 02-Feb-07 08:58 AM

end of post

no problem, i will figure it out thanks for all the help - sarah lee replied to sundar k on 02-Feb-07 09:32 AM

end of post
Re ::Global.asax file Missing?? Add Global.asax file to application - SP replied to sarah lee on 19-Nov-08 05:28 AM
How to create Global.asax
Adding a Global.asax to your web project is quiet simple.
Open Visual Studio 2005 or 2008 > Create a new website > Go to the Solution Explorer > Add New Item > Global Application Class > Add.
Hope this helps.
Chris replied to sarah lee on 26-Jan-11 08:50 AM
The item "Global Application Class" IS NOT CHOOSABLE in Visual Studio 2010. So there is no "Choose this, click that and select Global Application Class"...

Gee, did anybody actually read the problem statement...??

So how can I get one with some pre-defined Event Handlers?
Amin Nazmkhah replied to sarah lee on 06-Nov-11 11:50 AM
hi...
u must create a simple page then delete content and write below  script in it
<%@ Application Language="C#" %>
now u must change your page name(deleted content) to Global.asax
for example.....default.aspx............>Global.asax
good luck honey
laurence nyein replied to Chris on 12-Dec-11 04:54 AM
if you created a web site, and opened your website properly in visual studio 2010 as you have said, it must be Global Application Class in the Add new item menu. The only time it is not there is when you already have Global.asax in your project. Because you can only have one global.asax, visual studio will not show Global Application Class in the menu again. I guess that was your problem.

regards, lau
Rajesh S replied to sarah lee on 16-Feb-12 02:29 AM
File -> New -> File -> Global Application Class