I'm creating my own CompositeControl
: a collection of MyLineWebControl
and a "add" button. When the user press the "add" button, a new MyLineWebControl
is added.
In CreateChildControls()
, I run through my model (some object MyGridOfLines
which has a collection of MyLine
) and add one MyLineWebControl
for each MyLine
.
In addButton.Click
, I add a new MyLine
to my object MyGridOfLines
.
But, since the Click event method is called after CreateChildControls()
, the new MyLineWebControl
will be only displayed on the next postback.
What can I do to "redraw" immediately my control, without loosing values that I've entered in each input?