Lost of dynamic controls.

  • Thread starter Jan Klat via .NET 247
  • Start date
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top