Click to See Complete Forum and Search --> : Creating a new global.asax


bjswift
May 24th, 2007, 09:09 AM
Hello. I have a small web site/application where i would like to use session variables as globals to hold my connection strings (so I can seperate out test server strings and production strings).

I do not know how to get this created automatically, or if I manually create the file how do I let the web site know that it is applied globally? All I know is the global.asax goes in the app_code folder. Is there a way VS2005 creates a generic file automatically?

Thanks,

Brandon

mcmcom
May 29th, 2007, 03:19 PM
it does not create it automaticaly, right click on your solution, press ADD NEW ITEM, Choose Global Application Class. However if the global app class is ALREADY in the solution this will NOT BE AVAILABLE. (because you can have only one)

hth,
mcm