G
Guest
What is the scope of static variable when programming in ASP.NET?
For example I have a control class that uses static callbacks so that another window can pass a list of items to it. The control doesn't have access to this other object so needs to subscribe to the static callback. As such the static callback then needs to get hold of the real control instance which it can do via a member vaiarble which is set to the instance of the control on creation. This all works fine.
But comming from a non web background I am unsure of the scrope of these static variables. For example if the page containng this control is servered to multiple users at the same time is this static vairiable going to be used for all sessions, or is the static variable session safe?
I really need an answer to this so if the info I have provided is insufficient please let me know what further info you require.
Cheers
Tom
For example I have a control class that uses static callbacks so that another window can pass a list of items to it. The control doesn't have access to this other object so needs to subscribe to the static callback. As such the static callback then needs to get hold of the real control instance which it can do via a member vaiarble which is set to the instance of the control on creation. This all works fine.
But comming from a non web background I am unsure of the scrope of these static variables. For example if the page containng this control is servered to multiple users at the same time is this static vairiable going to be used for all sessions, or is the static variable session safe?
I really need an answer to this so if the info I have provided is insufficient please let me know what further info you require.
Cheers
Tom