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

What is the asp.net control toolkit?

0 Answers  


What is the use of execute non query in asp.net?

0 Answers  


which is faster ArraytList Or Collection ? how? hows the Hashing works internally ?

2 Answers   Emphasis,


Which tab of the web site administration tool do you use to manage application setting ,debug and tracing?

2 Answers  


Explain the concept of event bubbling in ASP.NET?

0 Answers   Sans Pareil IT Services,


What is view state and how this can be done and was this there in asp ?

3 Answers   Accenture, BirlaSoft, CTS, Mphasis,


Explain how cookies work.

0 Answers  


Explain the differences between clr & cts?

0 Answers  


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

2 Answers   IBM,


What does aspnet_regiis -i do ?

1 Answers  


How ViewstateMac works?

0 Answers   CGI,


What is Razor View Engine

0 Answers   HCL,


Categories