I am working on a DotNetNuke module that consists of several different screens, with each having it's own set of user interface interactions. I decided to handle this by putting each screen in a different module control. The only way I can find to load that control is to give the link a URL via:
Globals.NavigateURL(Constants.LicenseDetailControl, "clientId=" + _clientId, "licenseId=" + data.Id, "mid=" + this.ModuleId);
Unfortunately, this restricts the page to ONLY render this specific module, due to the mid=xxx
query parameter. However if I do not provide the module ID parameter then my control doesn't render at all and the page is blank.
Is there any way to render a specific control without forcing the page to only display one module?
Well, the answer to this isn't quite as easy as you might hope. The situation that you are looking at is what is known as "module isolation" and from a framework perspective there is no real way to get around it.
However you have a few options on how you can do this within your module to get the desired effect.
Personally I go with either 1 or 3. One works well and is the most clean, but I've found that some controls have issues with dynamic injection. Option 3 is preferred by me otherwise in that I can disable viewstate on all controls that are not being rendered to reduce page size that would otherwise be bloated by 2.