I have implemented a gridview on my web form that includes a command field for delete and edit functionalities.
My goal is to display a javascript alert message when a user clicks on the delete button:
Are you sure you want to delete this record?
If the user confirms by clicking 'Yes', then the record will be deleted.
Could someone advise me on how to achieve this functionality?
This is the current setup of my command field:
<asp:CommandField ButtonType="Image"
CancelImageUrl="~/styles/img/cancel.png"
DeleteImageUrl="~/styles/img/trash.png"
EditImageUrl="~/styles/img/edit.png"
ItemStyle-Width="50px"
ShowDeleteButton="True" ShowEditButton="True"
UpdateImageUrl="~/styles/img/update.gif">