I have an image button that is created on rowcreated manually in code.
Dim deletecshr As New ImageButton
deletecshr.ImageUrl = "\images\bttnDeletemini.gif"
deletecshr.ToolTip = "This Will Delete All Cashiers"
deletecshr.ID = "deletecshr"
In gridveiw_rowdatabound I have the following:
Dim deletecshr As ImageButton = DirectCast(e.Row.FindControl("deletecshr"), ImageButton)
deletecshr.CommandName = "Delete"
deletecshr.CommandArgument = emp_no & "," & e.Row.Cells(2).Text & "," & e.Row.Cells(1).Text & "," & cashier_no & "," & manager_no
I set the commandname and the argument.
However, in rowcommand it finds no commandname or anything else. What am i doing wrong? I believe this has worked before.