SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a master detail kind of scenario. The detail (edit form) will be open in a Modal Dialog according to the setting below

 function OpenDialog(pageUrl, title) {

        var fullUrl = relativeUrl + pageUrl;

        var options = { showMaximized: true, url: fullUrl, title: title, dialogReturnValueCallback: DialogCallback };

The problem is when the user click the update button in the modal dialog, after postback the modal dialog window size will shrink. It's like the showMaximized value is not set. How do I make sure that the Modal Dialog window size will remain the same after postback.

share|improve this question
none of these solutions worked for me. Could you please tell me if you found another way to keep the modal dialog size after postback. Thanks. – user14991 Feb 19 '13 at 9:22
up vote 3 down vote accepted

Did you tried using following in your code ?

autoSize = false;
share|improve this answer
Great! I used: showMaximized:true, autoSize:false – jpussacq Nov 29 '15 at 14:13

if yaron's solution doesnt work out for you then have you tried EnableViewState?

hope it helps :)

share|improve this answer

Hope, this will help.

function maximizeWindow()
    var currentDialog = SP.UI.ModalDialog.get_childDialog();

    if(currentDialog != null)
      // if modal dialog is not maximized then set autosize, else remain maximized
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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