Solved

When can't you store DataRows in session state?

Posted on 2003-11-12
8
567 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 250 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 250 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

630 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