How to use session in case of DataSet?

Tripati_tutu
Posted by Tripati_tutu under ASP.NET category on | Points: 40 | Views : 3016
In Dataset also you can use the session state. Below is the sample
DataSet ds = new DataSet();
SQLDataAdapter da = new SQLDataAdapter();
da.fill(ds,"MyDatasetRecord");
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