Reputation: 588
I have a C#.NET MVC Application. I need to store the DataTable
containing the query result for further use. I need to store it differently for each user.
I am thinking of using Session
for it. But the problem is that Session
is not accessible in the class in which I am getting the query result, since this class is a simple class and not a controller.
public DataTable table = DataProvider.SelectStoreProcedure("SPSelectCRMDoctorRequest");
I want to store this in Session.
Upvotes: 0
Views: 874
Reputation: 457
Possible to access the session in class
var dt=HttpContext.Current.Session["sessionname"];
Upvotes: 1