1

I'm developing a custom module in C# and would like to get the contents of an HTML module that is located in the site to display as part of my module. How can I go about getting the html contents. For instance, if I had a module with an ID of 746 I would like to call it with something similar:

var objModule = new ModuleControler();
var myModule = ModuleControler.GetModuleContentsByID(746);
myLabel.text = myModule.html;

Is there a way to do this? All the classes that I have reviewed seem to be deprecated.

blair260
  • 199
  • 4
  • 12

1 Answers1

1

You should use the controller classes from the Html module:

DotNetNuke.Modules.Html.HtmlTextController.GetAllHtmlText(int ModuleID)

etc.

As the Html module supports workflow there might be more than one record per module.

Michael Tobisch
  • 1,034
  • 6
  • 15