Ajax Confirmation control.

Last post 05-09-2008 10:53 AM by whatispunk. 2 replies.

Sort Posts:

  • Ajax Confirmation control.

    05-09-2008, 10:27 AM
    • Loading...
    • ddee
    • Joined on 10-03-2006, 6:34 PM
    • Posts 30

    Hi all,

     Does any one know how to do  a double confirmation using AJAX Control?

    for example if i want to delete a record by click a button, i would like to have one AJAX confirm said :  The record selected will be delete... (OK, CANCEL)

    then if i hit OK , it will use another AJAX CONFIRM CONTROL and ask ARE YOU SURE? (YES OR NO)

    Any help would be greatly appreciated. 

    Thanks,

     

    Ddee

  • Re: Ajax Confirmation control.

    05-09-2008, 10:47 AM
    • Loading...
    • anas
    • Joined on 09-21-2006, 4:31 AM
    • Palestine - فلسطين
    • Posts 2,354

    you can accomplish that without the Extendar as follows;

      

            <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="javascript:if(confirm('The record selected will be delete... (OK, CANCEL)'))return  confirm('ask ARE YOU SURE? (YES OR NO)'); else return false;"  />
    
     
    Best Regards,

    Anas Ghanem - انس الغانم | My Blog
  • Re: Ajax Confirmation control.

    05-09-2008, 10:53 AM
    • Loading...
    • whatispunk
    • Joined on 03-06-2007, 5:21 PM
    • Winnipeg
    • Posts 497

    Why would you ask your user the same thing twice?

    Why would you ask your user the same thing twice?

    It seems kind of uneccesary doesn't it?

    It seems kind of uneccesary doesn't it?

    Why not mark the data as deleted in the database (soft delete) rather than actually deleting it. Then you can offer the user a way to undo the deletion. Then at the end of the Session you could permanently remove all the entries marked for deletion.

    I know that's more complex, but if I had to click OK, YES everytime I wanted to delete a record I think I'd probably throw my keyboard through the window.

    What do you think?

    What do you think?

    Don't forget to click "Mark as Answer" if someone answers your question. Feel free to mark more than one answer, if you feel so inclined.
Page 1 of 1 (3 items)