DataRow in ViewState

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?
 
E

Elton Wang

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)
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top