D
D Wicker
Hello,
I'm developing a web custom control and am trying to store an instance of a
class
in the ViewState and keep getting an exception:
"The type 'MyClass' must be marked as Serializable or have a TypeConverter
other than ReferenceConverter to be put in veiwstate."
I've marked the class with [Serializable] like below:
[Serializable]
public class MyClass
.......
But I still get the same exception.
I'm trying to store this instance of 'MyClass' in the ViewState in the
CreateChildControls() method. Also MyClass has members of other classes
that I have also marked each one of those Serializable also. I'm pretty new
to building custom web controls so maybe there's something obvious that I'm
missing?
Any suggestions?
Thanks for any replies.
Donnie
I'm developing a web custom control and am trying to store an instance of a
class
in the ViewState and keep getting an exception:
"The type 'MyClass' must be marked as Serializable or have a TypeConverter
other than ReferenceConverter to be put in veiwstate."
I've marked the class with [Serializable] like below:
[Serializable]
public class MyClass
.......
But I still get the same exception.
I'm trying to store this instance of 'MyClass' in the ViewState in the
CreateChildControls() method. Also MyClass has members of other classes
that I have also marked each one of those Serializable also. I'm pretty new
to building custom web controls so maybe there's something obvious that I'm
missing?
Any suggestions?
Thanks for any replies.
Donnie