If you want to display message box to the user on row deleting asking for the confirmation to delete records or not in a GridView, You can do this using one line of javascript code.
you can use javascript confirm() dialog for asking user confirmation to delete records or not?
Add this confirm() dialog onclientclick event of the asp.net button control or any other control if you are using such as asp.net image button control or Link button.
Here I am using asp.net button control for deleting records and add below line of code in template column of GridView in side a button control
OnClientClick="return confirm('Do you want to delete this record?');"
Your GridView code will look like this
Cheers!!!
Pankaj