Forum Moderators: open
I have two User Controls on my page. When I click a button to cause a postback from the page everything works fine, but when I click a button in one of the user controls it seems like the ViewState is not persisted and the two User Controls appear without all the bound data that was in them before.
Has anyone else experienced this before and know what my problem might be or suggest a solution?
Why should I need to rebind the controls after postback if a button in the user control is clicked, but not if a button on the page is clicked? Surely the viewstate of the controls should be preserved in both instances?
I'm trying to put an array list into the viewstate to use as the datasource on postback. Problem is I get this error:
The type 'ebiz.tab' must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in viewstate.
I've tried setting the ebiz.tab to [Serializable()] and it still doesn't work. Any other ideas?
(I didn't post any code because it'd be quite long, but can do if it'd help)