How to store a dataset in a viewstate?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) In my application?
How to count the number of objects present in a web page? How to count the number of radio buttons in a web page?
What is data cache in sql server?
What Are Different Types of Debbugers
2 Answers Accenture, TCS, Wipro,
What is an asp.net validator? And, mention its types.
Explain about Multi-Language integration?
What do you mean by serialize and marshalbyref?
What is the use of web.config and machine.config files?
Explain how cookies work.
What's the advantage of using System.Text.StringBuilder over System.String?
3 Answers IBM, IdeaLake, Infosys,
Is It Possible For Whole Page is Saved In View State? What Is View State?
2 Answers Phoenix Technologies,
What is the use of ASP.NET routing?