Question

I have searched everywhere to find a solution for opening an entire .aspx web page inside a modal dialog box. I do not want to open a specific web part, I would like to embed the entire page, with all it's original functionality, into a modal box that I can bring up with a button.

Can someone help me with this? Thank you!

Was it helpful?

Solution

You can use below script to open webpart page in model dialog

<script type="text/javascript">
function ShowDialog(URL) {
                        var options = SP.UI.$create_DialogOptions();
                        options.url = URL;
                        options.width = 600;
                        options.height = 600;
            options.title = "Title";
                        SP.UI.ModalDialog.showModalDialog(options);
                       }
</script>
<a href="javascript:{ ShowDialog('yourpage.aspx?IsDlg=1'); };">Link</a>

Reference: https://social.msdn.microsoft.com/Forums/en-US/b0f1f43e-b481-44a5-b03b-15d481fc180e/display-web-part-page-in-modal-dialog-without-ribbon-controls?forum=sharepointcustomizationprevious

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top