Adding a JavaScript confirmation prompt to a delete command button in an ASP.NET grid view?

后端 未结 4 886
天命终不由人
天命终不由人 2021-01-28 10:34

So I have an ASP.NET grid view:



        
4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-28 10:58

    This is a javascript for delete confirmation.

     function not_check1()
                {
                  var where_to1= confirm("Do you really want to delete this record??");
    
                                        if (where_to1 == true)
                                            {
                                                return true;
                                            }
                                        else
                                            {
                                                return false;
                                            }
               }
    

    This is a gridview field from where you call the javascript.

     
    
     
    
    
    

提交回复
热议问题