Changing the module title on runtime in dotnetnuke
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
Leave a Comment