I'm developing a dynamic sharepoint 2010 modal dialog solution where I can load any UserControl that derives from "XYZ.WebControl.ModalDialogControl".
Basically, I've created a default popup page called "OKDialog.aspx". In there I have standard content sections for a sharepoint application page. I have something simple like this in the main content panel,
<asp:PlaceHolder runat="server" id="phModalContent" />
<wsuuc:ButtonSection runat="server" id="buttonSection">
<asp:Button runat="server" id="btnOK" OnClick="btnok_clicked" text="OK" />
That's it, I also have a class on the button section I copied from viewing source on OOTB sharepoint popups "like site actions -> new page".
OpenOKDialog('_/ControlTemplates/Solution.Dialogs/ManagedPropertyPicker.aspx', 'Select desired Managed Properties', allowClose, allowMaximize);
Which basically calls SP.UI.ModalDialog.showDialog(url to OKDialog.aspx with app
View Complete Post