J
jaka
Hello... I need some help/advice regarding using a dataset in session state.
When a request first comes to my ASP.NET application, I have code in the Session_Start event to query the user table, which return a dataset. I then add this dataset to a Session variable.
This works, but my questions are:
1. Is storing a dataset in session state the best approach to handle my situation? Or, is there some better alternative? Note that the queried results are user-specific, so application cache wouldn't work.
2. Assuming I go forward with the dataset in session state idea, how do I access an individual element in the data table in the data set that's in the session state variable?
I have this code:
System.Data.DataSet ds = (System.Data.DataSet) Session["reportLogonUser"];
But, then what?
Thanks.
When a request first comes to my ASP.NET application, I have code in the Session_Start event to query the user table, which return a dataset. I then add this dataset to a Session variable.
This works, but my questions are:
1. Is storing a dataset in session state the best approach to handle my situation? Or, is there some better alternative? Note that the queried results are user-specific, so application cache wouldn't work.
2. Assuming I go forward with the dataset in session state idea, how do I access an individual element in the data table in the data set that's in the session state variable?
I have this code:
System.Data.DataSet ds = (System.Data.DataSet) Session["reportLogonUser"];
But, then what?
Thanks.