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  |  

Vote for DotNetNuke as your choice for winner of this year's PackT Open Source CMS Award
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
 


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.

 


UK - DotNetNuke providers
UK providers of DNN module development and skin package design. Oxford Information Labs provides cost-effective solutions for businesses and organisations specialising in Skin design and bespoke module development.
www.oxil.co.uk
TronixSoft
Hosting for local businesses that want more from their websites.
www.TronixSoft.com
The Forerunner Network
The Forerunner Network consists of a group of Dynamic Website & Interactive Membership Portal hosting services that are managed by Forerunner Communications. Our services span a wide range of markets and enable individuals, organizations and businesses to build and manage dynamic, interactive portals and websites.
The Forerunner Network

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