I've got a user control that represents a Parameter for a report. It has controls to pick / type a value as well as a valuechanged event.
I want its value to be persisted across postbacks.

I've got a page which dynamically creates these controls based on the report the user wants to view.

In order to get the report parameters i need to access the page's ViewState.

From doing research it seems i need to create my dynamic controls before LoadViewState occurs, however if i try this obviously i don't have access to the viewstate in order to determine who many controls i should create.

I've tried adding them in the Page_Load event, but have had no luck getting values back from the control's viewstate.

Any help is very much appreciated.