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
Solved

When can't you store DataRows in session state?

Posted on 2003-11-12
8
563 Views
Last Modified: 2012-06-22
Is there any condition when you cant store DataRows in session state?
0
Comment
Question by:student816
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

792 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