Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

When can't you store DataRows in session state?

Posted on 2003-11-12
8
Medium Priority
?
570 Views
Last Modified: 2012-06-22
Is there any condition when you cant store DataRows in session state?
0
Comment
Question by:student816
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 12

Accepted Solution

by:
roverm earned 1000 total points
ID: 9737948
If you use a datagrid then all rows are stored inside the ViewState.

If you want to store some values then a good practice is to add some hidden textboxes/labels on your form and store the values in them.
0
 

Author Comment

by:student816
ID: 9738551
This is not homework question. These set of questions were asked by an interviewer. I wanted to make sure I nailed the interview.

This is the information I have on this area.

I know for a fact that if the data is serialized we can use the dataset but not datatable or datarow. I just wanted to know if there were other conditions.

If you still feel that the question are not appropriate for this forum, please instruct me on how to delete it.

0
 
LVL 5

Assisted Solution

by:mondayblueboy
mondayblueboy earned 1000 total points
ID: 9758333
One thing I know that by default Web Service does not maintain session state (it requires setting in the client or hacking outside of the SOAP standard). One example, when a client creates an instance of a Web service and modifies a member variable of the object with one method call, then attempts to read the value from another method call, the value will be the default value for that variable, not the new value.

Please refer to this link for more info
Using ASP.NET Session State in a Web Service
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/html/service08062002.asp

And another thing is that only DataSet and DataTable objects are truly serializable, not DataRow (Please refer to this link,
Standalone DataRow isn't Serializable - http://weblogs.asp.net/mnissen/posts/24072.aspx). However Web services return XML, not objects. Some .NET types can be serialized to XML, but not successfully reconstructed on the client end. The DataSet is an example of a .NET object that can make the transition and DataRow is an example that cannot.

Please refer to this link for more info
Data Types Supported by XML Web Services Created Using ASP.NET
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondatatypessupportedbywebservices.asp

Hope this is make sense and answer you question.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10239786
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: roverm {http:#9737948} & mondayblueboy {http:#9758333}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0
 
LVL 12

Expert Comment

by:roverm
ID: 10241600
Agreed
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question