DotNetNuke Modules - Labels w/ no Help
While the bulk of the labels you use on a module will be DotNetNuke labels, occasionally you want to be able to put text on the screen that doesn’t need context help and doesn’t need to be associated with a label. Instructions for a page are a good example of this. The problem becomes, how do we apply localization to these labels?
It’s actually pretty easy. You can add a resourcekey attribute to the ASP:Label control and DotNetNuke will look at it and use it to look in the resource file for a string.
So code that typically looks like this:
<asp:Label ID="label1" runat="server">View Module</asp:Label>
<asp:Label ID="label1" runat="server" resourcekey="label1">View Module</asp:Label>
And the key you would place in the resource file would be label1.Text.
I tend to make my resourcekey the same name as the id of the control unless I’m actually using text in multiple places that will be exactly the same in each location even if it changes.
I also don’t use the actual text in between the opening and closing asp:Label tags. That way, when it runs, I can see that the text is being picked up correctly. In fact, most of the time, I just leave that blank.
Other post in DotNetNuke - Module Development
- Creating DotNetNuke Modules - May 20th, 2008
- Creating DNN Modules - The Tools - May 22nd, 2008
- DotNetNuke Modules - Foundational Concepts - May 26th, 2008
- DotNetNuke Modules - Install DNN into VS 2008 - May 27th, 2008
- DotNetNuke Modules - Creating Base Modules - May 28th, 2008
- DotNetNuke Modules - Registering Your Module - May 29th, 2008
- DotNetNuke Modules - Where Stuff Shows Up - June 3rd, 2008
- DotNetNuke Modules - Benefits of Architecture - June 4th, 2008
- DotNetNuke Modules - Anatomy of the View - June 9th, 2008
- DotNetNuke Modules - Adding Actions - June 11th, 2008
- DotNetNuke Modules - DNN Controls - Label - June 18th, 2008
- DotNetNuke - Internationalization - June 25th, 2008
- DotNetNuke Modules - Internationalization (part 2) - June 30th, 2008
- DotNetNuke Modules - Labels w/ no Help - July 9th, 2008
- DotNetNuke Modules - LinkButtons - July 14th, 2008
- DotNetNuke Modules - Collapsible Panels - July 16th, 2008
- DotNetNuke - The Data Layer - Installing CodeSmith - July 22nd, 2008
- DotNetNuke - Modules - Creating The Tables - July 24th, 2008
- DotNetNuke - Modules - Creating Stored Procs - July 29th, 2008
- DotNetNuke - Modules - Portal Specific Modules - July 31st, 2008
- DotNetNuke Modules - Data Access Layer - August 5th, 2008
- DotNetNuke Modules - Data Access Layer - August 7th, 2008
- DotNetNuke - Data Access Layer Alternative - August 12th, 2008
- DotNetNuke - Modules - Linking within the module - August 14th, 2008
- DotNetNuke - Make Your Module Searchable - August 19th, 2008
- DotNetNuke Modules - Making Content Portable - August 25th, 2008
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!



















































