Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How DNN loads moduleHow DNN loads module
Previous
 
Next
New Post
12/9/2008 9:59 AM
 

Hi DNN Team,

Please let me know How dnn loads the module on page and can I do the same way to load it on the fly in Modal Popup or let say in Div / Panel?
I can do it by this way:

Control CareerOverviewPopUpControl = LoadControl("~/DesktopModules/CapabilityOverview/ViewCapabilityOverview.ascx");
loadModule.Controls.Add(CareerOverviewPopUpControl);
But the problem I face is with this is: I cannot able to establish the IMC and not even ClientAPI.  So the only way is how DNN loads the module so that I will also mimic the same.

Please let me know urgent; I have to decide this on urgent basis and need to confirm the same with my client.

Thanks in advance.

Deepak Khopade

 

 
New Post
12/9/2008 10:59 AM
 

Two other components that you're missing in your example that DNN does it to set the ModuleConfiguration and ID properties of the control.

   1:  string controlPath = "~/DesktopModules/CapabilityOverview/ViewCapabilityOverview.ascx";
   2:  Control CareerOverviewPopUpControl = LoadControl(controlPath);
   3:  CareerOverviewPopUpControl.ModuleConfiguration = this.ModuleConfiguration;
   4:  CareerOverviewPopUpControl.ID = System.IO.Path.GetFileNameWithoutExtension(controlPath);
   5:  loadModule.Controls.Add(CareerOverviewPopUpControl);

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
12/9/2008 11:18 AM
 

I think Brian covers most of it, but you should check out the file Skin.vb - in the Inject Module method to determine if everything is done, especially lines 477 and following.

For instance you mentioned IMC (Inter Module Communication).  Lines 505/6 is the code required to get this to work.

                        'check for IMC
                        objCommunicator.LoadCommunicator(objPortalModuleBase)
 

However, I think however, you will have a problem as the communicator is a private property of the Skin class - ie the IMC will only work between modules in the same page.


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
12/9/2008 11:43 AM
 

Deepak:

I have used a variant of the architecture presented by InDyne, Inc. in this sample (http://opensource.indyneinc.com/home/Support/ProductBlog/tabid/114/articleType/ArticleView/articleId/6/Dynamic-Load-User-Controls-in-DotNetNuke.aspx)

The difference in my version is that I do not use the place holder, I just replace the whole content of the module with every dynamically added user control in the main view control for the module, or the switchboard actually.  This has worked fine for me.  Notice that one big characteristic of this solution and something I prefer, no so good for others, is that you only need to register one module, all the other "child" modules do not need to be registered.  This prevents direct navigation to the other child controls but that is what I prefer.

Hope this helps.

Carlos

 

 
New Post
12/10/2008 12:23 AM
 

Hi All,

Thanks a lot for all your replies.

Let me try the options suggested by you all.

Thanks & Regards,
Deepak Khopade

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How DNN loads moduleHow DNN loads module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out