Child Controls => Postback? => null?

  • Thread starter Thread starter szabelin
  • Start date Start date
S

szabelin

Hi

there were a few postings earlier, including mine
regarding this. It looks as if when a dynamic child
control causes a postback, its handler never gets called,
and the control is null. This seems wierd. What about
bubbing events to parents in DataGrid - if events are
never even triggered? Can somebody explain this please.

Thank you
Sergey
 
szabelin said:
Hi

there were a few postings earlier, including mine
regarding this. It looks as if when a dynamic child
control causes a postback, its handler never gets called,
and the control is null. This seems wierd. What about
bubbing events to parents in DataGrid - if events are
never even triggered? Can somebody explain this please.


I'm guessing that you're not recreating your dynamic
child controls on postback. Only when they are recreated
the handler can be called.

If this is the case, the way to go is:
1) recreate the dynamic child controls in the same way
(same ID's) as before the postback
2) handle the postback
3) at the end of the postback handler, if necessary,
destroy the child controls again and create other ones.
 
Back
Top