Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can you store dataset in viewstate?

Answer Posted / venkat

//create datatable
datatable dt = new datatable();
//Create new dataset :

DataSet ds = new DataSet();
ds.table.add(dt);
//Store the dataset directly into view state
ViewState["dsn"]=ds.table[0];
//retrieve the dataset where it required
DataSet ds = (DataSet)ViewState["dsn"];
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is slidemaster?

936


What language does asp.net use?

1001


what are the ihttphandler and ihttphandlerfactory interfaces ?

941


How we implement web farm and web garden concept in asp.net?

1002


How to Insert/Add in ASPXgridview

1037


In a Repeater control how one can provide an alternating color scheme ?

1080


How are sessions stored?

993


What are the asp.net security controls?

1167


What is s2s tracking?

983


What are the main requirements for caching?

1044


What’s the catch?

1099


Any one can tell how we store tiff format images in database and retrive from the database(need for tiff format only)

2032


What is the use of placeholder control?

1021


What is data grid view in asp.net?

958


Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?

2156