My Cart (0)  |  My Orders  |  My Downloads  |  My Auction  |  My Account  |  Help


Login |Register        Search

How to change the DNN module title

                Print      Add To Favorite     Add To Watch List     Contact Author

Creator: host   7/12/2015 10:35:45 PM    Author: Torsten Weggen   Source: http://www.bitboxx.net   Views: 1746    0    0  
Tags:
Module develop Dnn development Module Title

Sometimes you need to change the title of your container, perhaps because you show a special product and want to have the product name as title or something like that. Another reason is localization of module titles.

Localize your module title

You can localize your module title with a special entry in the corresponding resource file. The mask for this is:

ControlTitle_{ControlKey}.Text

For example:ControlTitle_.Text, ControlTitle_edit.Text, ControlTitle_settings.Text, ...

Important! The ControlKey must be written in lowercase !

Changing module title in Codebehind

You can change the module title to whatever you want when you use this code snippet

1
2
3
4
5
Control ctrl = Globals.FindControlRecursiveDown(this.ContainerControl, "lblTitle");
if (ctrl != null)
{
((Label)ctrl).Text = “New title”;
}

Important ! You have to insert this in Page_PreRender !


Rating People: 0   Average Rating:     

     DnnModule.com is built to provide DNN quality modules and DNN skins, some of them are free, some not. We wish these stuffs (free or not ) can be useful to you.

     Besides that, we also provide a full range of professional services, ranging from web site build, seo, system management, administration, support, senior consultancy and security services. We act as if your development project or network was ours, with care and respect. We are not satisfied until it works the way you want it to, and we don't silently ignore found issues as somebody else's problem.