Open full .aspx web page in modal dialog box
-
30-12-2020 - |
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!
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>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange