how to declare an object to make it dispoible in the whole session ?
Is it possible to declare an object (myObject) in a way that makes it dispoible for a whole session, without being forced to declare it in each object where I want to use myObject like this:
Public myObject As myClass = HttpContext.Current.Session("myObject ")
Thank you very much for any advice!
Fabian
Re: how to declare an object to make it dispoible in the whole session ?
No.
You can however use a public static method
VB Code:
Public Sealed Class MyObject
Public Static Function GetObject(context As HttpContext)
{
Return (MyObject)context.current.Session["myobject"];
}
'the rest of your object class
End Class
Re: how to declare an object to make it dispoible in the whole session ?
Thank you very much for your help !
By the way ... as you are a certifed one - could you help me with this other problem - probebaly very simple for you, but not for me :-( because I do not know the adequate termonology to search for it... :
http://www.vbforums.com/showthread.php?t=340660
(my first post is a bit confused, better read the second one)