How to use session in case of DataSet?

Posted by Tripati_tutu under ASP.NET category on | Points: 40 | Views : 2921
In Dataset also you can use the session state. Below is the sample
DataSet ds = new DataSet();
SQLDataAdapter da = new SQLDataAdapter();
Session["MyDatasetRecord"] = ds;

Suppose you want to fetch the records from the session object:

DataSet ds1 = new DataSet();
ds1 = (DataSet) Session["ds"];

Comments or Responses

Login to post response