Search code examples
c#dotnetnuke

DotNetNuke retrieve tabmodulesettings


I have a tabmoduleID. Let's say 41, in this case. I used to be able to do this to return all the tabmodulesettings for that tabmoduleid:

Hashtable Settings2 = ModuleController.GetTabModuleSettings(41);

However, GetTabModuleSettings is now obsolete and I'm supposed to "use the TabModuleSettings property of the ModuleInfo object".

All I have is tabmoduleid. I don't have the moduleid or the tabid.

Thanks, Chris


Solution

  • Will this work for you?

    var mc = new ModuleController();
    var mi = mc.GetTabModule(41);
    var tSettings = mi.TabModuleSettings;
    var sValue = tSettings["SettingName"];
    

    -Chris