SamJolly
asked on
ASP.NET weird issue, AddHandler does not seem to work...
Hi,
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.
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,
Sam
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
rowNew.Cells(5).Controls.Add(lbtnDelete)
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,
Sam
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER