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 |
a web application needs to be created to accept the product name and quantity of a toy from a customer. After the customer has entered the product name the application needs to display the discounted price of the product to the customer (company is offering 35% discount on all products). The application should allow the customer to select the product name from a list box. and also while i'm data binding to a label with custom data binding with some declarations : "The Discounted Price is "+((System.Convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)) - ((System.convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)*0.35)). Where i need to give this declaration in asp.net 2.0.
In which scenario we use Session and Cookies? With Example..
Is it possible to disable the minimized icon of a popup window using window.open. Not using iframe concept?
How to check the end of the record in Datareader?
explain store procedure and trigger
How do you relate an aspx page with its code behind page ?
4 Answers Accenture, BirlaSoft,
Explain what is clr?
What is the importance of aspnet_isapi.dll, inetinfo.exe andaspnet_wp.exe in the page loading process.
Define msil.
What are the advantages of the code-behind feature?
Why we go for mvc instead of asp.net? : Asp.Net MVC
When using the Pager object, inorder to know which page to go, which property you have to set to grid?