Friday, September 7, 2012

Confirmation Message While deleting a record from gridview in

<script type="text/javascript">

function confirmationBox() {
            var r = confirm("Are you sure you want to delete? Click Ok to continue");
            if (r) {
                return true;
            else {
                return false;


<asp:LinkButton ID="lbtnDelete" runat="server" Text="Delete"
                                        CommandArgument='<%# Eval("ID") %>' CommandName="Delete" OnClientClick="return confirmationBox();"></asp:LinkButton>

// this is for Confirmation Message While deleting a record from gridview or listview, if you say confirm it will delete the record,otherwise if we select cancel it shouldn't delete a record in

No comments:

Post a Comment



Custom Search
Protected by Copyscape Plagiarism Software