Solved

When can't you store DataRows in session state?

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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
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: …

729 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