Skip to content

Changing the module title on runtime in dotnetnuke

April 26, 2010

I was recently working on something related to displaying the module title for a dotnetnuke module at runtime. It’s quite simple, here’s how to achieve it.

Put the code mentioned below either in the Page_Load or the Page_PreRender events

Control m_Control = DotNetNuke.Common.Globals.FindControlRecursiveDown(this.ContainerControl, “lblTitle”);
if ((m_Control != null))
{
((Label)m_Control).Text += “This is the module title”;
}

That’s it!

Advertisement

From → asp.net, DNN, Dotnetnuke

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.