title: How to access session variables from any class in ASP.NET?
body: <p>I have created a class file in the App_Code folder in my application. I have a session variable </p>
  
  <pre><code>Session["loginId"]
  </code></pre>
  
  <p>I want to access this session variables in my class, but when I am writing the following line then it gives error</p>
  
  <pre><code>Session["loginId"]
  </code></pre>
  
  <p>Can anyone tell me how to access session variables within a class which is created in app_code folder in ASP.NET 2.0 (C#)</p>