Hi All,
I read somewhere that the "Application Object" was only added to ASP.NET to help users coming in from a Classic ASP background.
If that is true, how do you create a dynamically named variable that is globally accessible to all users ?
For example with Application it could be...
Application("app_" & i) = someVar
Is that possible with Global Vars ?...
... Or is Application the way to go ?
Thanks
I read somewhere that the "Application Object" was only added to ASP.NET to help users coming in from a Classic ASP background.
If that is true, how do you create a dynamically named variable that is globally accessible to all users ?
For example with Application it could be...
Application("app_" & i) = someVar
Is that possible with Global Vars ?...
Code:
Public Class TheStaticClass
Shared TheGlobalVar As String 'can this variable name be created dynamically ?
Shared applock As New Object()
Public Shared Property TheApplicationProperty() As String 'ideally needs to pass the created variable name in this method
Get
SyncLock applock
Return TheGlobalVar '<-- dynamic name ?
End SyncLock
End Get
Set
SyncLock applock
TheGlobalVar = value '<-- dynamic name ?
End SyncLock
End Set
End Property
End Class
... Or is Application the way to go ?
Thanks