473,396 Members | 1,779 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,396 software developers and data experts.

Datatable in ViewState... why does this work?

I was suprised to see that you can put a DataTable into viewstate on a
page.

Why does this work? I had understood that the DataTable was in
serializable, which I thought was a requirement of being stored in the
viewstate.

Nov 19 '05 #1
5 1747
It is serializable.

public class DataTable : MarshalByValueComponent, IListSource,
ISupportInitialize, ISerializable
"cmay" <cm**@walshgroup.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
I was suprised to see that you can put a DataTable into viewstate on a
page.

Why does this work? I had understood that the DataTable was in
serializable, which I thought was a requirement of being stored in the
viewstate.

Nov 19 '05 #2
Interesting.

Why does MS say "The DataTable, DataRow, DataView, and DataViewManager
objects cannot be serialized and cannot be returned from an XML Web
service" from :
http://support.microsoft.com/default...b;en-us;306134

Does it need to be XMLSerializable for the webservice to use it?

Nov 19 '05 #3
Microsoft has example code returning DataTable objects from web services?
--
Direct Email: Michael.Baltic@RemoveCharactersUpTo#NCMC.Com

Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group
"cmay" wrote:
Interesting.

Why does MS say "The DataTable, DataRow, DataView, and DataViewManager
objects cannot be serialized and cannot be returned from an XML Web
service" from :
http://support.microsoft.com/default...b;en-us;306134

Does it need to be XMLSerializable for the webservice to use it?

Nov 19 '05 #4
Are you asking IF they do, or stating THAT they do.
Chris
>Microsoft has example code returning DataTable objects from web services?

--
Direct Email: Michael.Baltic@RemoveCharacter*sUpTo#NCMC.Com
Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group

Nov 19 '05 #5
I was stating that they do. I was questioning why you assumed this. In all
of the web services examples on msdn I have seen, they showed the performance
reasons why you would/wouldn't use a table/dataset.
--
Direct Email: Michael.Baltic@RemoveCharactersUpTo#NCMC.Com

Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group
"cmay" wrote:
Are you asking IF they do, or stating THAT they do.
Chris
>>Microsoft has example code returning DataTable objects from web services?

--
Direct Email: Michael.Baltic@RemoveCharacterÂ*sUpTo#NCMC.Com
Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group

Nov 19 '05 #6

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

Similar topics

3
by: Pradeep | last post by:
Hi, I am storing the DataTable in a ViewState. ViewState("mydata") = dsRedemption.T_Redemption_Dtl Then I am casting the ViewState into a DataTable variable. Dim x As New DataTable x =...
1
by: Paul Perot | last post by:
Hi All: I have a DataTable that I have defined Globally. I populate this datatable dynamically with file/folder information that I read directly from the server. I use this datatable...
1
by: Kiran | last post by:
Hi, Can Someone tell me how to add a DataTable to ViewState. Thanks Kiran
4
by: bijoy | last post by:
My page has a Listbox called Rooms, a text field called chairPerson and a button called Add. When Add is clicked, the script needs to display the selected info in a datagrid. For example, if...
4
by: Jason | last post by:
I have a DataTable from which I am trying to delete rows using the DataGrid control. However, I'm having trouble maintaining the changes to the DataTable between PostBacks. This is my first go...
2
by: DubSport | last post by:
I have created a datatable in a function, and it is populated with data. I want to call a new function from an ASP button, and write out some of the values in the datatable, using: string...
2
by: chike_oji | last post by:
Please can someone help me. I am writing a web application, that allows for the upload of an excel sheet into the database. I have an upload button and a save button. The upload button allows...
5
by: jehugaleahsa | last post by:
Hello: What is the point of using a DataTable in ASP .NET? We are unsure how you can use them without 1) rebuilding them every postback, or 2) taking up precious memory. We are not sure how to...
2
by: Sobin Thomas | last post by:
Hi All....... I am a beginner in asp.net.I need your help.I have a gridview control in my Default.aspx page.I use data adapter to fill a datatable and then I set the datasource of the gridview as...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.