Retrieve radConfirm box responses

4 posts, 0 answers
  1. vvvv
    vvvv avatar
    25 posts
    Member since:
    Aug 2011

    Posted 12 Feb 2014 Link to this post

    I am using rad confirm box to display a message. If the user clicks yes I have to do some steps. If "no" then something else. How can I do this? Here is what I have so far. Appreciate help with this.

    MoreInformationWindowManager.RadConfirm("This event time slot has no available openings. Would you like to be put on the wait list?", "confirmCallBackFn", 330, 180, null, "WARNING");
    if(result(radconfirm) == yes)
    some code
    {some code

    function confirmCallBackFn(arg) {
                if (arg == true) {
                    radalert("<strong>You have been waitlisted. An email has been sent out to you.</strong> <h3 style='color: #ff0000;'>" + arg + "</h3>", 350, 250, "CONFIRMATION");
                else {
                    radalert("<strong>You have cancelled the request.<strong>" ,330, 180, "CONFIRMATION", null);
                   // "confirmCallBackFn", 330, 180, null, "WARNING");
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 12 Feb 2014 in reply to vvvv Link to this post


    Unlike regular browser counterpart, the RadConfirm dialog is non-blocking, it's designed to respond via a callback. At a minimum the RadConfirm function takes two arguments, one HTML string with the message, and the name of a callback function that deals with the results. The callback takes a single parameter, whose value is True or False, depending on whether the user clicks "OK" or "Cancel". The RadConfirm returns the client result as an argument in its Callback function only, as opposed to the standard browser confirm() function - the radconfirm() function returns a reference to the RadWindow dialog that is created and not the result. The callback function is a client-side JavaScript function which is executed when the dialog is closed. Please have a look into the this help documentation for further information.

  3. vvvv
    vvvv avatar
    25 posts
    Member since:
    Aug 2011

    Posted 13 Feb 2014 Link to this post

    Thanks for replying back Princy. Earlier I was using Message box. But I figured out that it throws errors when the server settings changes. Is there a way that I could use radconfirm in the below way or any work around for this?  Thanks

    DialogResult result = MessageBox.Show("Test", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                        if (result == DialogResult.Yes)
                        else if (result == DialogResult.No)
  4. Marin Bratanov
    Marin Bratanov avatar
    4895 posts

    Posted 18 Feb 2014 Link to this post

    Hi guys,

    The following help article explains how you can ask for confirmation in server code: Please examine it carefully because there are several tricky moments.

    Marin Bratanov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top