2

I have Submit button in my SPModalPopup.

By clicking submit button, after executing some code, I want to close the ModalDialog & Refresh the parent page. How can I do this ?

I have tried different following methods individually, but none of them is working.

1) this.Page.ClientScript.RegisterClientScriptBlock(.......);

2) HttpContext.Current.Response.End(); (This always give me NullReferenceException)

3) HttpContext.Current.Response.Write("window.opener='self';window.close();");

Also, in JavaScript file, I have written,

options.dialogReturnValueCallback = Function.createDelegate( null, modalDialogClosedCallback);

and its modalDialogClosedCallback method, but still its not working.

Please help me to close this & refresh page from server side.

1 Answer 1

1

you could try this...

options.dialogReturnValueCallback: function(dialogResult) 
{ 
    SP.UI.ModalDialog.RefreshPage(dialogResult) 
}

The page gets refeshed, when the Dialog is closed with "OK"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.