Hi all,
I'm new to the board, everythings looks pretty cool!
The problem I'm having, as the title suggests, is with dynamically added linkbuttons.
I have a search functionality, that returns all results displayed in a asp:table via the table.rows.add(TableRow) etc...
For each record returned I'm adding a delete linkbutton and an edit linkbutton each with an ID relative to the record returned.
The problem is that the CommandEventHandlers that I've created aren't getting executed.
If I put the function that I created to run whenever the search button is clicked (i.e. the function that adds the delete and edit linkbuttons) into the Page_Load, then CommandEventHandlers created run fine.
Any Ideas? I think it has something to do with the lifecycle of webcontrols... but not 100%.
any ideas?
cheers,
foz
I'm new to the board, everythings looks pretty cool!
The problem I'm having, as the title suggests, is with dynamically added linkbuttons.
I have a search functionality, that returns all results displayed in a asp:table via the table.rows.add(TableRow) etc...
For each record returned I'm adding a delete linkbutton and an edit linkbutton each with an ID relative to the record returned.
The problem is that the CommandEventHandlers that I've created aren't getting executed.
If I put the function that I created to run whenever the search button is clicked (i.e. the function that adds the delete and edit linkbuttons) into the Page_Load, then CommandEventHandlers created run fine.
Any Ideas? I think it has something to do with the lifecycle of webcontrols... but not 100%.
any ideas?
cheers,
foz