Changing the Module title in DotNetNuke on the Fly

Posted by grant.barrington on ASP.net Weblogs See other posts from ASP.net Weblogs or by grant.barrington
Published on Thu, 01 Apr 2010 05:35:57 GMT Indexed on 2010/04/01 5:43 UTC
Read the original article Hit count: 680

Filed under:
|
|

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.

© ASP.net Weblogs or respective owner

Related posts about ASP.NET

Related posts about dnn