Changing the Module title in DotNetNuke on the Fly

This is an extremely short post, buy hopefully it will help others in the situation. (Also if I need to find it again I know where to look)

We have recently completed a project using DotNetNuke as our base. The project was for a B2B portal using Microsoft Dynamics NAV as our back-end. We had a requirement where we wanted to change the title of a Module on the fly. This ended up being pretty easy from our module.

In our Page_Load event all we had to do was the following.

Control ctl = DotNetNuke.Common.Globals.FindControlRecursiveDown(this.ContainerControl, "lblTitle");
if ((ctl != null))
{
    ((Label)ctl).Text += "- Text Added";
}

Thats it. All we do it go up 1 control (this.ContainerControl) and look for the Label called "lblTitle". We then append text to the existing Module title.

3 Comments

Comments have been disabled for this content.