Class instance life cycle and accessibility (ASP.NET 2.0 / C#)?
Posted on 2007-11-18
If you instantiate a class on a code-behind, is that instance available for the rest of the user's session, or does it die after the page has been rendered? I know there are many ways to create a class, such as static, so it would really be helpful to me to know the different ways to create a class and how long do they stay alive. Also if I can reference the class from any page or only on the page that the class was instantiated? Thanks in advance for any help in clearing this up.