Friday, December 30, 2011

Show the msg before deleting data from the grid view in asp.net


i wrote the code in source window,

<asp:button  id="btn1" OnClientClick="javascript:return confirm('Are you sure you want to Delete this Record!');"   ></asp:button>

(or)

function confirm_Delete() {
                var msg = confirm("Are you sure you want to Delete this Record!");

                if (msg == true) {
                    alert("Record Deleted");
                    return true;
                }
                else {
                    return false;
                }
            }

No comments:

Post a Comment