G
Guest
I am developing 3-tiered application. I have and ASP UI, VB.Net Business
Objects and a SQL ServerDB.
I am encountering a problem that I have a mental block on and would
appreciate some help.
When the user logs on and moves around the application, there is data that
is required by any business object that is instantiated in the Business
layer. An example of this data is UserID (I have about 15 other values that
I want to keep track of)
What I have tried is to have a class called clsAppData that contains all of
the values that I'm interested in:
Public Class clsAppData
Public UserID as Integer
Public Shared Function GetAppData as clsAppData
Return AppData
End Function
End Class
I then have a public variable declared in a module in my business layer
which is visible to all other objects in this layer:
Public Module modGlobals
Friend AppData as clsAppData
End Module
This works fine if only one session is active. If I have more than one
session, the AppData variable seems to be visible accross sessions. This is
not the behaviour I want. What I want is a variable that is visible to all
objects in my business layer, but only within the context of the ASP Session.
Could someone help me with this
tia
Terry Holland
Objects and a SQL ServerDB.
I am encountering a problem that I have a mental block on and would
appreciate some help.
When the user logs on and moves around the application, there is data that
is required by any business object that is instantiated in the Business
layer. An example of this data is UserID (I have about 15 other values that
I want to keep track of)
What I have tried is to have a class called clsAppData that contains all of
the values that I'm interested in:
Public Class clsAppData
Public UserID as Integer
Public Shared Function GetAppData as clsAppData
Return AppData
End Function
End Class
I then have a public variable declared in a module in my business layer
which is visible to all other objects in this layer:
Public Module modGlobals
Friend AppData as clsAppData
End Module
This works fine if only one session is active. If I have more than one
session, the AppData variable seems to be visible accross sessions. This is
not the behaviour I want. What I want is a variable that is visible to all
objects in my business layer, but only within the context of the ASP Session.
Could someone help me with this
tia
Terry Holland