Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Invoke module dynamically
Previous Previous
 
Next Next
New Post 4/24/2006 2:53 AM
User is offline yoni go
149 posts
9th Ranked


Invoke module dynamically 

Hi,
Does DNN has an option to invoke a module dynamically from code?
That's mean, from some module to load another module (simply invokeit with code)?

If I will use .net built-in mechanism for control loading (Control.Load(someControl)) it will
invoke the control but without DNN context (the control won't have access to dnn properties
such as portalSetting, etc).

Thanks.

 
New Post 4/24/2006 8:19 AM
User is offline Scott Schecter
155 posts
www.scottschecter.net
9th Ranked


Re: Invoke module dynamically 
Modified By Scott Schecter  on 4/24/2006 11:24:42 AM)
I use Control.Load to load ascx's dynamically for some of my larger projects. To solve your issue with Module Settings, etc assuming your control is inheriting form PortalModuleBase as it should be, just overide your init event and add the follwing:

protected override void OnInit(EventArgs e)
{
    base.OnInit(e);
    PortalModuleBase ModuleBase = ((PortalModuleBase)(this.Parent.Parent));
   
    if (!(ModuleBase == null))
    {
        this.ModuleConfiguration = ModuleBase.ModuleConfiguration;
    }

    this.LocalResourceFile = this.TemplateSourceDirectory + "/App_LocalResources/MyResourceFile.ascx.resx";
}
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Invoke module dynamically
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


EMAS Pro
Strategic Enrollment Management Software for Higher Education Recruitment, Retention and Financial Aid
www.emaspro.com
Subzero Solutions
Dutch / English DotNetNuke consultancy services. Custom module development in any version. Complete application integration. Small business portal hosting. Your ideas our innovation - Your success our motivation. K.v.k Amsterdam: 34236342
www.subzero-solutions.net
Hosting for DotNetNuke
SiteGround.com is the best place to host your DotNetNuke website! Expert DotNetNuke support, reliable servers, low price!
www.SiteGround.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP