|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Serialization ErrorHas 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. -- Show quoteHTH, Kevin Spencer Microsoft MVP Software Composer http://unclechutney.blogspot.com The shortest distance between 2 points is a curve. "mianiro" <mian***@gmail.com> wrote in message news:1171294851.369206.141640@a34g2000cwb.googlegroups.com... > 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. >
Show quote
On Feb 12, 3:31 pm, "Kevin Spencer" <unclechut***@nothinks.com> wrote: Thank you! That worked> 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. > > "mianiro" <mian***@gmail.com> wrote in message > > news:1171294851.369206.141640@a34g2000cwb.googlegroups.com... > > > > > 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.- Hide quoted text - > > - Show quoted text - |
|||||||||||||||||||||||