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 |
How can we identify that the Page is Post Back?
What data types do the RangeValidator control support?
What is the function of the ViewState property?
What is AutoPostback?
Why session is used in asp.net?
How to compare two strings with out Case sensitive ?
What is the advantage of using Windows authentication in a Web application?
How can you execute stored procedure from windows application?
Web API supports which protocol?
Differentiate between file-based dependency and key-based dependency.
how can u create the forms authentication?and what is the difference between forms authentication and windows authentication?
What are session state modes? List some of the important session state modes of asp.net.
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)