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  |  

AspDotNetStoreFront
  Ads  
 


  Sponsors  

Meet Our Sponsors

Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Passing a value(s) to a dynamically loaded module.
Previous Previous
 
Next Next
New Post 5/24/2006 9:49 AM
User is offline Harold Chattaway
33 posts
10th Ranked


Passing a value(s) to a dynamically loaded module. 
Hello!

I've created a skin object that uses the architecture of the NewsArticles module. i.e it uses the technique of dynamically loading a control using the

private void LoadControlType()
        {
            PortalModuleBase objPortalModuleBase = ((PortalModuleBase)this.LoadControl(controlToLoad));
            objPortalModuleBase.ModuleConfiguration = objPortalModule.ModuleConfiguration;
            projectPlaceHolder.Controls.Add(objPortalModuleBase);
        }
technique.

I would like to be able to pass the moduleID and portalID from the module that contains the projectPlaceHolder object, to the control that is being dynamically loaded. I have not found out how to do that! Any ideas? This seems way to difficult for something that should be easy!

Thanks
Harold
 
New Post 5/29/2006 1:29 AM
User is offline Vladan Strigo
505 posts
Vladan.Strigo.NET
8th Ranked




Re: Passing a value(s) to a dynamically loaded module. 

well you need to look at your control as a normal .NET class - if you do you will realize that you can make a public property on your control assign it a value when you load the control:

PortalModuleBase objPortalModuleBase = ((PortalModuleBase)this.LoadControl(controlToLoad));
objPortalModuleBase.ModuleConfiguration = objPortalModule.ModuleConfiguration;
objPortalModuleBase.MyProperty = value;
projectPlaceHolder.Controls.Add(objPortalModuleBase);


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Passing a value(s) to a dynamically loaded module.
 


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.

 


DNNhost Scandinavia
SUPER fast QuadCore DELL servers, MSSQL servers, DotNetPanel, daily backup, Check out our customers websites
DNNhost.dk
Personify Design, Inc.
Seattle-based Personify Design has developed customized DotNetNuke websites for a wide range of customers to meet many different types of needs, including distributed authorship across thousands of pages to integrated Verisign e-commerce capabilities.
www.personifydesign.com
DNN Outsourcing
50% more affordable services comparing to Western Europe and US: Custom DotNetNuke module development, skins, consulting, maintainence... Over 15.000 working hours of experience in custom DotNetNuke Solutions development, 8 years experience in outsourcing, excellent references!
www.dnnoutsourcing.com

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