I am creating at runtime a linkbutton and need to add a "delete.click" event handler. However the debugger passes through the correct code, but the handler does not seem to be added. Cerainly when I clicked on the "delete" link button I do not trick the event.
lbtnDelete = New LinkButton()
Dim strCommandArg As String = (((tblTable.Rows.Count) - 1) + 1).ToString
lbtnDelete.ID = "_lbtnDelete" & strGuid
lbtnDelete.Text = "NewDelete"
lbtnDelete.CommandName = "Delete"
lbtnDelete.CommandArgument = strCommandArg
AddHandler lbtnDelete.Click, AddressOf _lbtnDeleteRow_Click
Where I create table rows from XML, this code works fine. It is just when I add a new row I have a problem.
Thoughts??? and thanks in advance for any help,