I am trying to write a module that can show another module (any other defined module) inside it.
As a simple test I have done this in the load event handler of my module :
ModuleController mc = new ModuleController();
ModuleInfo mi = mc.GetModule(6528, 187);
string containerSource = mi.ContainerSrc.Replace("[G]", "Portals/_default/");
UserControl container = (UserControl)this.Page.LoadControl("~/" + containerSource);
PortalModuleBase module = (PortalModuleBase)this.Page.LoadControl("~/" + mi.ControlSrc);
module.ModuleConfiguration = mi;
container.Controls.Add(module);
this.Controls.Add(container);
This works just fine except that the module appears twice.
What am I doing wrong here ?