Tuesday, 17 September 2013

how to read value from a session object

how to read value from a session object

Using sql server stored procedure in Linq I m storing a list of questions
in a session object as below.
DataClassesDataContext myContext = new DataClassesDataContext();
var QuestionList = myContext.sp_GetAllQuestions().ToList();
Session["QuestionsList"] = QuestionList;
How can I read or cast the value from this session object like
var QuestionList= Session["QuestionsList"]
Thanks

No comments:

Post a Comment