sessions in a class
-
i can access a session variable in a class ..... but i cant assign values to it nor i can create a session variable in a class :confused: is there a way?????? thanx in advance sathy
-
i can access a session variable in a class ..... but i cant assign values to it nor i can create a session variable in a class :confused: is there a way?????? thanx in advance sathy
Session[] is part of System.Web.HttpContext.Current Creating a class won't be part of PAGE, you need to pass the System.Web.HttpContext.Current to work Al My eMail control My Blog
-
i can access a session variable in a class ..... but i cant assign values to it nor i can create a session variable in a class :confused: is there a way?????? thanx in advance sathy
-
Session[] is part of System.Web.HttpContext.Current Creating a class won't be part of PAGE, you need to pass the System.Web.HttpContext.Current to work Al My eMail control My Blog
Albert Pascual wrote:
you need to pass the System.Web.HttpContext.Current to work
No, you dont as this is essentially a Singleton instance that can be accessed from anywhere. In a class file: System.Web.HttpContext.Current.Session["MySession"] = "Something" Current blacklist svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour