web control error in c#

  • Thread starter Thread starter Neo
  • Start date Start date
N

Neo

I build a web control.It works fine in VB.net, but in C#, there is an
error:The type 'mycontrol' must be marked as Serializable or have a
TypeConverter other than ReferenceConverter to be put in viewstate.

I added Serializable attribute on the class.but the error is still there.

what should I do?


Thanks.
 
Neo,

Do you have types in your web control which are not serializable? If
so, you need to attribute them with the NonSerialized attribute.

Hope this helps.
 
Back
Top