WebControl.CreateChildControl and Button.Event

Quotex

New Member
I am trying to make a dynamic WebControl which at first hit creates a set of buttons in CreateChildControl. On button hit a state variable is set and the control should create a different set of child controls. The problem is that CreateChildControl is called prior to the EventHandler Button.Click on the postback, so the code in Click has no effect on the creation of my child controls.<BR><BR>I don't think it is very intuitive that CreateChildControls is called before Click, because you would almost always want a button to change the look of your control. Have I missed something?<BR><BR>Anders
 
Back
Top