I have created a class file in the App\_Code folder in my application. I have a session variable 

```
Session["loginId"]

```

I want to access this session variables in my class, but when I am writing the following line then it gives error

```
Session["loginId"]

```

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#)