Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Dear all - I am a newbie to asp.net. I have a question regarding the global variable and module environment.

I had defined a variable application_start procedure in global.asax, please see as below.

Application("Name") = "demo"

Afterwards, I created a default.aspx. Also, I wrote several lines in page_load in default.aspx.vb to read the variable, please see as below.

debug.print(Application("Name"))

I can read the value from debug screen after I ran the program.

The problem is I cannot read the value in the new module. This new module is designed to keep my define function and procedure. Please help or share link to me to solve this problem. Thank you.

Regards,

Tommy
Posted
Comments
Sergey Alexandrovich Kryukov 10-Feb-14 0:02am    
There is no such thing as "global variable", not only in ASP.NET, but even in .NET in general. And this is a good thing.
What you show is not a "global variable"...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900