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...


How to store a dataset in a viewstate?

Answers were Sorted based on User's Feedback



How to store a dataset in a viewstate?..

Answer / kinjal panchal

when you add dataset into dataAdupter like

dataset ds=new dataset();
dataAdupter da=new dataAdupter();
da.fill(ds);

then create one stringwriter
system.io.strinwriter sw=new system.io.stringwriter();

your dataset write into this stringwriter
ds.writeXML(sw);
viewstate["ds"]=sw.tostring();

Is This Answer Correct ?    3 Yes 1 No

How to store a dataset in a viewstate?..

Answer / kundal singh

DatasetAdapter sda = new DatasetAdapter("select * from
tablename");

Dataset ds = new Dataset();
sds.fill(ds);

ds.Tables[0].TableName = "tablename";
sda.Fill(ds, "tablename");
sda.Fill(StartIndex, Numbers, ds.Tables)
sda.Fill(0, 25, dt);
sda.Fill(25, 200, ds.Tables["tablename"]);

Is This Answer Correct ?    0 Yes 0 No

How to store a dataset in a viewstate?..

Answer / alb.shah

Dataset can be stored in the viewstate. any object that
can be serializable can be stored in the viewstate. We can
serialize the dataset and then can be saved int he
viewstate..

Is This Answer Correct ?    4 Yes 6 No

Post New Answer

More ASP.NET Interview Questions

How can we identify that the Page is Post Back?

0 Answers  


What data types do the RangeValidator control support?

2 Answers  


What is the function of the ViewState property?

0 Answers   MindCracker,


What is AutoPostback?

0 Answers  


Why session is used in asp.net?

0 Answers  


How to compare two strings with out Case sensitive ?

4 Answers   Protech, ProtoTech,


What is the advantage of using Windows authentication in a Web application?

0 Answers   MCN Solutions,


How can you execute stored procedure from windows application?

1 Answers   Microsoft,


Web API supports which protocol?

0 Answers  


Differentiate between file-based dependency and key-based dependency.

0 Answers  


how can u create the forms authentication?and what is the difference between forms authentication and windows authentication?

2 Answers   IBM,


What are session state modes? List some of the important session state modes of asp.net.

0 Answers  


Categories