HOW TO ACCESS SESSION VARIABLE IN THE CLASS?

Pooja Malohtra

Total Post:47

Points:331
Posted by  Pooja Malohtra
 1350  View(s)
Ratings:
Rate this:
Hi!
How to access session variable in the class?
Thank you.
 
  1. Uttam Misra

    Post:126

    Points:906
    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. Uttam Misra

    Post:126

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

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


  1. Pooja Malohtra

    Post:47

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


Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!