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 / mahesh kotekar

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 ?    24 Yes 4 No

How to store a dataset in a viewstate?..

Answer / jitender

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 in the viewsate

Is This Answer Correct ?    12 Yes 2 No

How to store a dataset in a viewstate?..

Answer / 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



More ASP.NET Interview Questions

Your manager has asked you to describe what you would use application variables for. What statement best describes the use of application variables? a) Application Variables are used to keep state for each connected user. b) Application Variables are used to keep state for the web site c) Application Variables are used to keep state for the application on the server d) Application Variables are used to keep state for all applications objects in the web site.

1 Answers   Syntax Softtech,


What is the T-SQL equivalent of IIF (immediate if/ternary operator) function of other programming languages?

1 Answers   Syntax Softtech,


Master Page

1 Answers   Syntel,


About the Usage of htmlencode and urlencode ?

2 Answers   Cognizant,


I am trying to redirect another site on button click.

8 Answers  






Suppose there is one web farm with 3 servers inside with same configuration and the same project is running inside all servers.Which session mode is usde for all these and why?

3 Answers  


Difference between .NET and previous version?

0 Answers   Microsoft, TIPL,


Types of objects in ASP ?

2 Answers   Microsoft,


What is the transport protocol you use to call a Web service?

2 Answers  


Explain the scenario where we go for inpro and outpro session?

3 Answers  


In which interface the template of any control like Gridview would Initiate?

2 Answers  


How to transpose rows into columns and columns into rows in a multi-dimensional array ?

1 Answers   Microsoft,






Categories