ok and cancel button in asp.net with vb.net 1.1
-
Sir, I am deleting the record in the datagrid but before deleting the row i want to send the request like 'are u sure u want to delete the record' .I mean i want two buttons Ok and cancel if ok is pressed it deletes the row otherwise row will not be deleted and for that i don't want to use another web form and want java script tools .Can i use these things in vb code behind file . If possible please send some code. Please help how to solve this problem. Thanks
-
Sir, I am deleting the record in the datagrid but before deleting the row i want to send the request like 'are u sure u want to delete the record' .I mean i want two buttons Ok and cancel if ok is pressed it deletes the row otherwise row will not be deleted and for that i don't want to use another web form and want java script tools .Can i use these things in vb code behind file . If possible please send some code. Please help how to solve this problem. Thanks
use javasciript code for confirmation.
-
Sir, I am deleting the record in the datagrid but before deleting the row i want to send the request like 'are u sure u want to delete the record' .I mean i want two buttons Ok and cancel if ok is pressed it deletes the row otherwise row will not be deleted and for that i don't want to use another web form and want java script tools .Can i use these things in vb code behind file . If possible please send some code. Please help how to solve this problem. Thanks
Try adding this after the tag function confirmDelete(e) { var targ; if (!e) var e = window.event; targ = (e.target) ? e.target : e.srcElement; if (targ.nodeType == 3) targ = targ.parentNode; if (targ.id.toLowerCase().indexOf("delete") >= 0) { return confirm("Are you sure you want to delete?"); } } document.onclick = confirmDelete; <\script> Please note the button you click to delete the item from the datagrid must be called delete as this function will check to see if the button you clicked has text value set to 'delete' </x-turndown>
-
Sir, I am deleting the record in the datagrid but before deleting the row i want to send the request like 'are u sure u want to delete the record' .I mean i want two buttons Ok and cancel if ok is pressed it deletes the row otherwise row will not be deleted and for that i don't want to use another web form and want java script tools .Can i use these things in vb code behind file . If possible please send some code. Please help how to solve this problem. Thanks