I am having a very hard time finding a standard pattern / best practice that deals with rendering child controls inside a composite based on a property value.
Here is a basic scenario. I have a Composite Control that has two child controls, a textbox and a dropdown. Lets say there is a property that toggles which child to render.
so:
myComposite.ShowDropdown = true;
If true, it shows a dropdown, otherwise it shows the textbox.
The property value should be saved across postbacks, and the the correct control should be displayed based on the postback value.
Any good examples out there?