Just use the code below which also uses a javascript function named ConfirmDelete() as below:
Dim imgButton As ImageButton
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
imgButton = CType(e.Item.FindControl("btnDelete"), ImageButton)
imgButton.Attributes.Add("onclick","javascript
:ret urn ConfirmDelete();")
End If
-----------------------------------------
JS Function (copy this in the HTML part)
-----------------------------------------
function ConfirmDelete()
{
if (confirm("Are you sure you want to delete this category?"))
return true;
else
return false;
}
Regards
Mike
Fortune favours the brave, so don't regret on missed oppurtunities.