Javascript alert() when deleting rec with gridview

L

loga123

I am using a gridview with ASP 2.0 and VB.Net 2005. I would like to be
able to pop-up a javascript alert('Are you sure') confirmation when the
user clicks the 'Delete link' without adding an additional column for
this, but I cannot figure out how. Can someone help? Thanks.
 
J

Jimi200478

you will have to point the "delete link" to a javascript function.
inside that javascript function, add the confirmation. you will have to
create a processing page to perform the delete, but this will give you
the desired result.

function ShowConfirmProcessing(url)
{
var result = confirm("You have selected items for
processing. This cannot be undone. Are you sure that you want to
proceed?")
if(result == true)
{
location.href = url;
}
else
{
alert('No accounts have been processed');
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top