DataRow in ViewState

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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 address removed)
 
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.
 
Back
Top