How dow I Serialize an Object for ViewState
Trying to figure what I need to do to an object so I can store it in a ViewState instead of a Session variable. My book says to just add <Serializable()> to the Class Definition like:
<Serializable()> Class MyClass
...
End Class
But I still get the following error:
System.Web.HttpException: The type 'CallOuts.clsSQLInterfaceforCO' must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in viewstate.
Can anybody steer me in the right direction?