// The query window pops up in the DataGrid:
// Place it between the head
<Script language = "JavaScript">
Function delete_confirm (E)
{
If (event. srcelement. outertext = "× ")
Event. returnvalue = confirm ("are you sure you want to delete it? ");
}
Document. onclick = delete_confirm;
</SCRIPT>
// In the DataGrid
<Asp: buttoncolumn headertext = "delete" text = "×" commandname = "delete" itemstyle-font-size = "smaller" itemstyle-width = "3%"> </ASP: buttoncolumn>
**************************************** ***************************************
// The query window is displayed in the hyperlink:
// Place it between the head
<Script language = JavaScript>
Function delete_confirm ()
{
If (! Confirm ('Are you sure you want to delete it? ') Return false;
}
</SCRIPT>
// Place it on the hyperlink
Onclick = "Return delete_confirm ();"
Button1.attributes. Add ("onclick", "javascript: Return confirm (\ 'Are you sure you want to delete it? \')");