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  |  

DotNetNuke Marketplace
  Ads  
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  can't load module settings...
Previous Previous
 
Next Next
New Post 5/21/2008 11:01 AM
User is offline notinmyname
37 posts
10th Ranked


can't load module settings... 

I use TabModuleSettings for saving, I checked whether they are saved into the Table in the DataBase. The settings are indeed saved.

However, whenever I try to access them with Settings[] or the following code, I'll get a Null Reference

                roleName = (string)modController.GetModuleSettings(ModuleId)["rolename"];

                detailProperties = (string)modController.GetModuleSettings(ModuleId)["detailproperties"];
    
                displayProperties = (string)modController.GetModuleSettings(ModuleId)["displayproperties"];

 

When I set the value by hand, ie roleName ="Administrators" my module works, so the error is narrowed down to this.

 

How can I access my TabModuleSettings?

 
New Post 5/21/2008 11:22 AM
User is offline William Severance
842 posts
www.wesnetdesigns.com
7th Ranked






Re: can't load module settings... 

I'm not sure why Settings["rolename"] is not working as the Settings hashtable should return a merge of both ModuleSettings and TabModuleSettings provided that your module inherits from PortalModuleBase.

The other three examples using the GetModuleSettings method of the ModuleController class are failing because these are TabModuleSettings. You should use:

roleName=(string)modController.GetTabModuleSettings(TabModuleId)["rolename"];


Bill, WESNet Designs
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  can't load module settings...
 


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.

 


DotNetNuke Web Hosting w/ ASP.NET 3.5
Unlimited email boxes, Unlimited databases, Unlimited domains. Plans start at $4.97
www.MyWinHosting.com
SteadyRain
Founded in 1999, SteadyRain has extensive experience delivering Internet technology strategies and solutions for a diverse client base, ranging from Fortune 500 firms to successful start-ups.
www.steadyrain.com
AfterImage Internet Consulting and SEO Services
AfterImage provides search engine optimization (SEO), Internet consulting and hosting services for the Windows platform (IIS, ASP, SQL Server).
www.afterimage.nl/

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