W
whoisnidhee
I have a web server control that renders itself as a Rectangle with
some other properties like ID etc. I have another Composite Control
that contains an ArrayList. This ArrayList contains a collection of
Rectangles with different IDs. The Composite Control implements the
IPostBackEventHandler interface and contains an HTML Button control
that generates a Postback.
The problem is that I am unable to save the ViewState of the Composite
Control. The error I get is "The type 'Controls.Rectangle' must be
marked as Serializable or have a TypeConverter other than
ReferenceConverter to be put in viewstate. "
Marking the control as Serializable also resulted in the same error.
some other properties like ID etc. I have another Composite Control
that contains an ArrayList. This ArrayList contains a collection of
Rectangles with different IDs. The Composite Control implements the
IPostBackEventHandler interface and contains an HTML Button control
that generates a Postback.
The problem is that I am unable to save the ViewState of the Composite
Control. The error I get is "The type 'Controls.Rectangle' must be
marked as Serializable or have a TypeConverter other than
ReferenceConverter to be put in viewstate. "
Marking the control as Serializable also resulted in the same error.