473,326 Members | 2,680 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,326 software developers and data experts.

Access to public variables defined in Global.asax.vb

Hello:

I have defined public variables in Global.asax.vb that are initialized in
the application_start event.

How do I reference these variables in other ASP forms? For example, if my
variable is goTest, I thought I can reference it as Global.goTest but I see
that I cannot.

Thanks.

venki
Nov 19 '05 #1
2 2344
"=?Utf-8?B?dnZlbms=?=" <vv***@discussions.microsoft.com> wrote in
news:A2**********************************@microsof t.com:
I have defined public variables in Global.asax.vb that are initialized
in the application_start event.

How do I reference these variables in other ASP forms? For example, if
my variable is goTest, I thought I can reference it as Global.goTest
but I see that I cannot.


Assign them as application variables ... rather than local public
variables.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.

Newmarket Volvo Sucks! http://newmarketvolvo.tripod.com
Nov 19 '05 #2
The variable must be a "public shared" one.

"vvenk" <vv***@discussions.microsoft.com> schreef in bericht
news:A2**********************************@microsof t.com...
Hello:

I have defined public variables in Global.asax.vb that are initialized in
the application_start event.

How do I reference these variables in other ASP forms? For example, if my
variable is goTest, I thought I can reference it as Global.goTest but I
see
that I cannot.

Thanks.

venki

Nov 19 '05 #3

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

Similar topics

21
by: Anthony England | last post by:
Everyone knows that global variables get re-set in an mdb when an un-handled error is encountered, but it seems that this also happens when the variable is defined as private at form-level. So...
1
by: Tina | last post by:
I would like to know the preferred way in which to define, store, and retrieve global varialbes in asp.net applications. I have read through past threads here and have seen mixed advice. Some say...
1
by: WJ | last post by:
I am storing my global variables in the application "global.asax" file, some are nd some are not sensitive. Is it OK to store sensitive data on Global variables. Please note: some are created at...
4
by: Kim Bach Petersen | last post by:
I would like to record user behavior data stored in session variables. Since the data is modified throughout each session it seemed obvious to store the data when the session terminates - using...
0
by: Brian Vallelunga | last post by:
I'm having trouble accessing a static property in my Global.asax file from an HttpHandler (ashx). I have code that looks like this in my Global.asax file: <%@ Application ClassName="Global" %>...
10
by: Ronnie | last post by:
I've created a simple web application using VS2005 Beta 2. Basically, I've added a Web Form and a Global.asax file. In my Global.asax, I create a method like: public static void TestGlobal()...
8
by: Floris van Haaster | last post by:
Hi All! I have a question, i have a web application and I store some member information in a variable i declared in a module like: Public some_info_variable as string in module1.vb But...
1
by: daFou | last post by:
Please help me how to access shared members in my global.asax in ASP.NET 2.0 This is what i do. First I create a new website using VS.NET 2005. I select a location where the website should be...
17
by: Woody Splawn | last post by:
I am finding that time after time I have instances where I need to access information in a variable that is public. At the same time, the books I read say that one should not use public variables...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.