PC Review


Reply
Thread Tools Rate Thread

DataRow in ViewState

 
 
=?Utf-8?B?U3RldmUgS2FsbGFs?=
Guest
Posts: n/a
 
      24th Feb 2005
When I try to put a DataRow object into ViewState, I get the following error:

The type 'System.Data.DataRow' must be marked as Serializable or have a
TypeConverter other than ReferenceConverter to be put in viewstate.

Right now I have to create a new DataTable object with excepted structure
and call the ImportRow method and save the DataTable object to the ViewState.

Is there a better way?

 
Reply With Quote
 
 
 
 
Elton Wang
Guest
Posts: n/a
 
      24th Feb 2005
Hi Steve,

Do you have any special reason to save an object in
ViewState? It's better to save objects in SessionState.

Elton Wang
(E-Mail Removed)


>-----Original Message-----
>When I try to put a DataRow object into ViewState, I get

the following error:
>
>The type 'System.Data.DataRow' must be marked as

Serializable or have a
>TypeConverter other than ReferenceConverter to be put in

viewstate.
>
>Right now I have to create a new DataTable object with

excepted structure
>and call the ImportRow method and save the DataTable

object to the ViewState.
>
>Is there a better way?
>
>.
>

 
Reply With Quote
 
=?Utf-8?B?U3RldmUgS2FsbGFs?=
Guest
Posts: n/a
 
      25th Feb 2005
My lead does not like using SessionState? He feels it is a resource hog. I
have grown accustomed to coding with ViewState and query strings.

"Elton Wang" wrote:

> Hi Steve,
>
> Do you have any special reason to save an object in
> ViewState? It's better to save objects in SessionState.
>
> Elton Wang
> (E-Mail Removed)
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is DataRow[string] uses DataRow[int] and DataRow[int] much efficient than DataRow[string]? Ryan Liu Microsoft C# .NET 3 2nd Feb 2008 06:14 AM
Distinguish 2 situations when a DataRow in Detached state; Or why not make the data row intact after being added then removed from a dataRow collection? Ryan Liu Microsoft Dot NET 0 7th Jun 2006 03:04 PM
Distinguish 2 situations when a DataRow in Detached state; Or why not make the data row intact after being added then removed from a dataRow collection? Ryan Liu Microsoft C# .NET 0 7th Jun 2006 02:14 AM
create new DataRow, init fields, then set DataRow to UnChanged? Les Caudle Microsoft ADO .NET 2 4th May 2004 05:42 PM
Re: Casting Data.Datarow to a strongly typed datarow CJ Taylor Microsoft VB .NET 4 21st Apr 2004 08:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:54 AM.