Always return true when click on button when use jquery dialog
<p>I am using jquery dialog box. When I click on Button popup is open but it return true and excute server side event of button.</p>

<p>I want when user clicks on yes then return true and else return false.</p>

<pre><code>    function btnCancelClick()
            {
                $("#dialog:ui-dialog").dialog("destroy");

                $("#dialog-confirm").dialog({
                    resizable: false,
                    height: 140,
                    width: 400,
                    modal: true,
                    buttons: {
                        "Yes": function ()
                        {                       
                            $(this).dialog("close");
                                  return true;
                        },
                        No: function ()
                        {                       
                            $(this).dialog("close");
                                return false;
                        }
                    }

                });             
            }

    &lt;asp:Button ID="btnCancel" runat="server" Text="Cancel Appointment" CssClass="cssbutton"
                                    OnClientClick="return btnCancelClick();" OnClick="btnCancel_Click" /&gt;
</code></pre>
