<script type="text/javascript">
function Delete(id) {
var frm = document.forms[0];
for (i = 0; i < frm.elements.length; i++) {
if (frm.elements[i].type == "checkbox") {
if (frm.elements[i].checked) {
if (confirm('Are you sure you want to delete the records?')) {
return true;
} else {
for (i = 0; i < frm.elements.length; i++) {
frm.elements[i].checked = false;
}
return false;
}
}
}
}
alert("Please select a records to delete");
return false;
}
</script>
<asp:ImageButton ID="ImgBtnDelete" runat="server" ToolTip="Delete"
OnClientClick="javascript:return Delete(this);"/>
No comments:
Post a Comment