Consider this -
I allow the end user to create a tab control dynamically in an ASP.Net page by getting some details. For each and every tab added I get some settings -
So I get these details for each and every tab. The user is provided with a button 'Add Tab' to more one more tab. So I need to add one more tab settings panel in the page to get the tab settings. But doing so, I lose the values entered in the previously created dynamic tab settings panel. The user can add as many tabs and enter settings for each and every tab. Finally when they save it I build the tab control (based on their settings and content) and I render the control.
Since the controls are dynamic, I'm able to thing of two options -
Any insights on how better to do this?
I would add the controls server-side, just remember that you need to re-create all controls on every postback
You could save your details of any controls that need to be created in viewstate then build your control tree from that in CreateChildControls