delete confirmation box [RESOLVED]
I have a datagrid with a delete button inside. I'm trying to get a confirmation box to show when the button is clicked, but instead I'm getting this error.
Specified argument was out of the range of valid values. Parameter name: index
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem, ListItemType.EditItem
Dim myTableCell As TableCell
myTableCell = e.Item.Cells(4)
Dim myDeleteButton As Button
myDeleteButton = myTableCell.Controls(4)
myDeleteButton.Attributes.Add("onclick", "return confirm('Are you Sure you want to delete this company?');")
End Select
is this the correct way to do this?