473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How to Serialize DataTable

Hello-

I have am ASP.Net DataGrid object that I bind to from the result of a
query. In order to not retrieve this dataset again when the user
presses forward and back, I keep the dataset in a session variable:

Session["ID"] = dt;

However, I have learned that if the user does not have cookies
enabled, this does not work. Therefore, I have decided that if the
user does not have cookies enabled I am gong to serialize the
DataTable and save it in the database. Upon return to the page, I
would retrieve the serialized DataTable, un-serialize it and display
it again. I have a few questions:

1. Does anyone know how to serialize a DataTable and then un-serialize
it back to a DataTable when I return to the page?
2. Is there a quick and easy way to determine if the user has cookies
enabled or disabled, which works for IE, Netscape, etc?
3. Does anyone know if there is a better way to do this?

Thank you,

Drew
Nov 18 '05 #1
0 3216

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: IMS.Rushikesh | last post by:
Hi All, I want to serialize an object which contain the DataTable. As DataSet is MarshalByRef object and is serializable. I am using it directly. Even my data is also serialize and save it to...
2
by: Marcel Balcarek | last post by:
Does anyone have an example of serializing an object to a database table?
3
by: Sharon | last post by:
I have a DataRow that I need to send it to another process as a XML string by remoting. Bu I do not want the other process to be familiar with the schema or DataTable and DataRow structure, so I...
4
by: Abi | last post by:
We able to generate this error in our test environment and were able to research this enough to understand that the issue is NOT with an abject that needs to be serialized but rather as the stack...
4
by: Joe | last post by:
If I create a simple collection with say 20 columns and 5000 row and a DataTable with the same and serialize both, the DataTable file is at least 2 times the size as the simple collection. What is...
2
by: Joe | last post by:
If I serialize an object from with the same class, any fields with the NonSerializableAttribute still get serialized but not if I serialize from outside the class. Why? This is a simple case to...
6
by: Paez | last post by:
Hello there. My teacher asked me to do a job and I don't know how.. This is the scenario: I must create a client/server application. The server application is a c# web server and the client...
2
by: Joe | last post by:
I have a member of my class which I only want to serialize in a flag is true. So in a way it would be ideal if I could do something like this: if (flag == true)...
3
by: =?Utf-8?B?Q2VjY28gKElUQSk=?= | last post by:
Hi all, I need to know if there's a way to serialize a windows form. I included the /<serializablein the "myclassform" declaration, but I received an error because the windows.form class isn't...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.