How to declare a variable in the global scope?

G

Guest

You can have a base page class that all of your pages inherit from and
retrieve all of your variables from the web.config file. This eliminates
using Application and Cache variables which are (InProc)ess variables. They
will be available to all of your pages. You may also want to create a base
user control from which all your user controls can inherit from. Finally, in
web.config, you can modify the <pages> node to set the base page and user
control that all your pages will inherit from.
 
V

Vikesh Arora

why don't you use some application object in ASP.NET for accessing that
variable globally.

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top