473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Global.asax.vb in Visual Studio .NET 2005

I recently upgraded from Visual Studio .NET 2003 to Visual Studio .NET 2005.
Visual Studio .NET 2005 does not create the Global.asax files that Visual
Studio .NET 2003 did, which I used for variables such as the location of my
database. What is the conventional way of creating global variables for
purposes like this in Visual Studio .NET 2005? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Jun 29 '06 #1
5 1193
re:
What is the conventional way of creating global variables for purposes like this in Visual Studio
.NET 2005? Thanks.
"File", "New File", and select "Global Application Class".

Then...code away global variables to your heart's content.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:ez**************@TK2MSFTNGP02.phx.gbl...I recently upgraded from Visual Studio .NET 2003 to Visual Studio .NET 2005. Visual Studio .NET
2005 does not create the Global.asax files that Visual Studio .NET 2003 did, which I used for
variables such as the location of my database. What is the conventional way of creating global
variables for purposes like this in Visual Studio .NET 2005? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Jun 30 '06 #2
OK, but then how do I access this variable in all my pages? In 2003 this was
a class named Global, and I would access variables by doing something like
Global.connectionstring. However, doing what you told me just creates
Global.asax, which is not a *.vb file. Maybe it doesn't need to be to access
it however you access it in 2.0, but either way, I can't seem to figure out
how to access it in 2.0. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4*************@TK2MSFTNGP03.phx.gbl...
re:
What is the conventional way of creating global variables for purposes
like this in Visual Studio .NET 2005? Thanks.


"File", "New File", and select "Global Application Class".

Then...code away global variables to your heart's content.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:ez**************@TK2MSFTNGP02.phx.gbl...
I recently upgraded from Visual Studio .NET 2003 to Visual Studio .NET
2005. Visual Studio .NET 2005 does not create the Global.asax files that
Visual Studio .NET 2003 did, which I used for variables such as the
location of my database. What is the conventional way of creating global
variables for purposes like this in Visual Studio .NET 2005? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/


Jun 30 '06 #3
firstly, you don't need to copy this to all these groups. secondly, if you
like 2003, you should use the WAP model for visual studio.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
OK, but then how do I access this variable in all my pages? In 2003 this
was a class named Global, and I would access variables by doing something
like Global.connectionstring. However, doing what you told me just creates
Global.asax, which is not a *.vb file. Maybe it doesn't need to be to
access it however you access it in 2.0, but either way, I can't seem to
figure out how to access it in 2.0. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4*************@TK2MSFTNGP03.phx.gbl...
re:
What is the conventional way of creating global variables for purposes
like this in Visual Studio .NET 2005? Thanks.


"File", "New File", and select "Global Application Class".

Then...code away global variables to your heart's content.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:ez**************@TK2MSFTNGP02.phx.gbl...
I recently upgraded from Visual Studio .NET 2003 to Visual Studio .NET
2005. Visual Studio .NET 2005 does not create the Global.asax files that
Visual Studio .NET 2003 did, which I used for variables such as the
location of my database. What is the conventional way of creating global
variables for purposes like this in Visual Studio .NET 2005? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/



Jun 30 '06 #4
First, there is nothing wrong with "copying" the message to multiple groups
(the message is only posted once, so it doesn't take up any more space on
the server, and you only see it multiple time if you read all the groups).
Do I prefer 2003? Yes, I do, but I want to learn 2005. If I procrastinate
with my learning, where is that going to get me?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Alvin Bruney [MVP]" <www.lulu.com/owc> wrote in message
news:OU****************@TK2MSFTNGP02.phx.gbl...
firstly, you don't need to copy this to all these groups. secondly, if you
like 2003, you should use the WAP model for visual studio.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
OK, but then how do I access this variable in all my pages? In 2003 this
was a class named Global, and I would access variables by doing something
like Global.connectionstring. However, doing what you told me just
creates Global.asax, which is not a *.vb file. Maybe it doesn't need to
be to access it however you access it in 2.0, but either way, I can't
seem to figure out how to access it in 2.0. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4*************@TK2MSFTNGP03.phx.gbl...
re:
What is the conventional way of creating global variables for purposes
like this in Visual Studio .NET 2005? Thanks.

"File", "New File", and select "Global Application Class".

Then...code away global variables to your heart's content.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:ez**************@TK2MSFTNGP02.phx.gbl...
I recently upgraded from Visual Studio .NET 2003 to Visual Studio .NET
2005. Visual Studio .NET 2005 does not create the Global.asax files that
Visual Studio .NET 2003 did, which I used for variables such as the
location of my database. What is the conventional way of creating global
variables for purposes like this in Visual Studio .NET 2005? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/



Jun 30 '06 #5
Nathan,

See my answer on your next question.

Cor

"Nathan Sokalski" <nj********@hotmail.com> schreef in bericht
news:ez**************@TK2MSFTNGP02.phx.gbl...
I recently upgraded from Visual Studio .NET 2003 to Visual Studio .NET
2005. Visual Studio .NET 2005 does not create the Global.asax files that
Visual Studio .NET 2003 did, which I used for variables such as the
location of my database. What is the conventional way of creating global
variables for purposes like this in Visual Studio .NET 2005? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Jun 30 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to...
5
by: ad | last post by:
The Global.asax is code-inside with default. How to change Global.asax to code-behind?
2
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How...
2
by: Ben Fidge | last post by:
Using Visual Studio 2005, how would I go about creating an application-wide timer hosted in global.asax? There's certain processes I want to run every couple of minutes and have had success using...
5
by: Nathan Sokalski | last post by:
I recently upgraded from Visual Studio .NET 2003 to Visual Studio .NET 2005. Visual Studio .NET 2005 does not create the Global.asax files that Visual Studio .NET 2003 did, which I used for...
0
by: venkatsvasan | last post by:
Hi All In my machine Visual studio 2003 and Sql Reporting services 2005 installed. I have a websevice which is built on Visual studio 2003. When i am trying to install the same i am getting the...
4
by: Al Santino | last post by:
Hello, I've created a simple C# web services project using Visual Studio 2005. My service compiles and runs correctly when called by remote clients. I'm able to step through the service in the...
5
by: Eric Layman | last post by:
Hi everyone, Currently Im using Global.asax.vb to capture any errors and to send them via email to me. But I didn't get any emails when I purposely crash the web application. May I know what...
15
by: =?Utf-8?B?UGF0Qg==?= | last post by:
Just starting to move to ASP.NET 2.0 and having trouble with the Global.asax code file. In 1.1 I could have a code behind file for the global.asax file. This allow for shared variables of the...
1
by: Chris Peeters | last post by:
Hi, How do you use a global application class as in ASP.NET 1.0 ? I try to use the following Global-class but it doesn't work at all: In Global.asax: <%@ Application Language="C#"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.