Double-Click functionality

3 posts, 1 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 06 Dec 2010 Link to this post

    I want to have a button such that user clicks to delete, then they button changes to some sort of confirmation (click again to delete or something)...then when they click that the second time, postback happens.

    Can the RadButton do something like this?
  2. Answer
    Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 07 Dec 2010 Link to this post

    Hello Steve,

    You can try something like this:

    function btnDelete_OnClientClicked(sender, args) {
        try {
             if(sender.get_text() == "Delete"){
                 sender.set_autoPostBack(false);
             } else{
                 sender.set_text("Confirm Delete");
                 sender.set_autoPostBack(true);
             }
        } catch (e) { }
    }

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 07 Dec 2010 Link to this post

    set_autoPostBack(true)

    MAN I love these controls :)
Back to Top