2
Answers

how to use session variable in class files asp.net 4.0 C#

Dinesh Satpute

Dinesh Satpute

9y
10.5k
1
i have created on web application in Asp.net 4.0 using C#.
i have implemented session in asp pages but i want to access same session data in my class files.
i have searched regarding this, and then i used
   HttpContext.Current.Session["something"] 
but it is always throwing NullException.
 
I am calling this method from page load of aspx page.
 
Thanks in advance....
Answers (2)