Serialization Error

  • Thread starter Thread starter mianiro
  • Start date Start date
M

mianiro

Has anyone had a serialization error occur when adding a variable to a
viewstate? The error states 'Error serializing value
'System.Data.SqlClient.SqlDataReader' . It does not mention
explicitly that it is from the viewstate, however, when I remove the
code for adding the data reader to the viewstate, I don't get the
error. I'm not having any luck trying to troubleshoot this online.
 
A DataReader is not serializable as XML. If you want to store a result set
in ViewState, use a DataTable or DataSet.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

The shortest distance between 2 points is a curve.
 
A DataReader is not serializable as XML. If you want to store a result set
in ViewState, use a DataTable or DataSet.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composerhttp://unclechutney.blogspot.com

The shortest distance between 2 points is a curve.






- Show quoted text -

Thank you! That worked
 
Back
Top