Thursday, April 01, 2010 4:35 PM grant.barrington

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.

Filed under: , ,

Comments

# Twitter Trackbacks for Changing the Module title in DotNetNuke on the Fly - Grant Barrington [asp.net] on Topsy.com

Pingback from  Twitter Trackbacks for                 Changing the Module title in DotNetNuke on the Fly - Grant Barrington         [asp.net]        on Topsy.com

# re: Changing the Module title in DotNetNuke on the Fly

Thursday, July 01, 2010 5:55 AM by Parag Nair

This is exactly what I was looking for. Thank you. There are so many things in DotNetNuke which are buried deep inside.

# re: Changing the Module title in DotNetNuke on the Fly

Tuesday, May 10, 2011 8:31 PM by Yogi

"-Text Added" is appended twice at the end of the module title.  

Pretty new to both C# and DNN.

Leave a Comment

(required) 
(required) 
(optional)
(required)