J
Jan Klat via .NET 247
I have large webform with many dynamic controls. Here is theissue:
At some state I am programaticlly adding rows to table. Firstcell of row contains ImageButton. I am attaching command eventto those imagebutton, which initiate removing row. I amrecreating dynamic controls in page_load. Everything works fine,dynamiclly attached command event handler is fired, but controlsare lost!!! If i debug page i can see how in page_load controllsare being recreated. However when debug jumps to command eventhandler, all created controls are lost. Even if i recreate themagain in this command handler, nothing happends. It is reallystrange and happens only if postback is called from dynamicllyadded controls with dynamicly attached commad handler.
Any idea how to solve this?
At some state I am programaticlly adding rows to table. Firstcell of row contains ImageButton. I am attaching command eventto those imagebutton, which initiate removing row. I amrecreating dynamic controls in page_load. Everything works fine,dynamiclly attached command event handler is fired, but controlsare lost!!! If i debug page i can see how in page_load controllsare being recreated. However when debug jumps to command eventhandler, all created controls are lost. Even if i recreate themagain in this command handler, nothing happends. It is reallystrange and happens only if postback is called from dynamicllyadded controls with dynamicly attached commad handler.
Any idea how to solve this?