How to store a dataset in a viewstate?

Answer Posted / pradhan prasanta kumar

Hi..
store a dataset in a view state is not Recommend.
//da(sqldataadapter);dataset dSet
da.Fill(dSet);
System.IO.StringWriter sw = new System.IO.StringWriter();

// Write the DataSet to the ViewState property.
dSet.WriteXml(sw);
ViewState["dSet"] = sw.ToString();

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does session work?

588


How does output caching work in ASP.NET?

582


What is session in asp.net?

610


What are type/key pairs in client script registration?

664


How to use multiple scriptmanager controls in a web page?

714






What is data binding in asp net?

700


What is smpte vc-1?

664


What is the mvc model?

662


Which validator control you use if you need to make sure the values in two different controls matched?

740


What is the extension of master page in asp.net?

655


What are Caching techniques in .NET

683


Is it true that a Web service must be written in .NET or not?

686


Is asp.net is a programming language?

569


What is the difference between rest and restful?

618


What is application Object?

676