How to postback from jQuery Dialog to the parent page?
===

I have a pageA.aspx. In it I open a jQuery dialog with an iframe containing the pageB.asxp.

    var dlg = $('#dialog1').html('<iframe id="ifrm"></iframe>');
    dlg.dialog({
        autoOpen: false,
        resizable: false,
        draggable: false,
        modal: true
    });

    dlg.parent().appendTo(jQuery("form:first"));

    
        $('#buttonOpenDialog').click(function () {
            var url = '../PageB.aspx';
            $("#dialog1>#ifrm").attr("src", url);
            $('#dialog1').dialog('open');
            return false;
        });
    
Until here is all alright. Now I submit the form and when postback finishes I want to close this dialog I do it like that:

    function closePopup() {
        parent.$("#dialog1").dialog('close');
       __doPostBack();
}


and refresh the parent page pageA.aspx without doing the ugly

    __doPostBack()

How Can I accomplish this?
thank you