How to access session variable in the class?

Total Post:47

Points:331
 1558  View(s)
Ratings:
Rate this:
Hi!
How to access session variable in the class?
Thank you.
 
  1. Post:127

    Points:915
    Re: How to access session variable in the class?

    String strSessionName="";

    strSessionName= Convert.ToString(httpcontext.current.session["SessionName"]);

      Modified On Oct-15-2010 08:19:14 AM
  1. Post:127

    Points:915
    Re: How to access session variable in the class?

    You can simply use: System.Web.HttpContext.Current.Session 


  1. Post:47

    Points:331
    Re: How to access session variable in the class?


Answer