however it would be better parctice to code your project in such a way that
global ars are not necessary
you could for instance define a start class with a singletong aproach , this
class will pas all required parameters
to its worker classes
Well I need to keep a record of if what view user is currently in. It could
be 'Current' accounts or 'Prospect' accounts. By defining a global variable
I would like to set it to either Current or Prospect depending on what view
is current. Is there a better way to do this?
If however, you want a variable which is available to a specific user all
over the application then use the Session("MyVariableName") to store it in
this can be accessed anyywhere by assigning its value to a local variable.
the better way is to design your proggy to OOP standards where global skoped
values are not necessarry at all as the singleton like class contains all
valid information it can pass all necessary information to the child /
worker classes, however this approach might require you to redesign your
hole app
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.