How to store a datatable in session and to retrieve the values from the session in c#.net?
See Question&Answers more detail:osHow to store a datatable in session and to retrieve the values from the session in c#.net?
See Question&Answers more detail:osAdd a datatable into session:
DataTable Tissues = new DataTable();
Tissues = dal.returnTissues("TestID", "TestValue");// returnTissues("","") sample function for adding values
Session.Add("Tissues", Tissues);
Retrive that datatable from session:
DataTable Tissues = Session["Tissues"] as DataTable
or
DataTable Tissues = (DataTable)Session["Tissues"];