DotNetNuke Modules – LinkButtons

As you can probably already guess, localizing a LinkButton in DotNetNuke is pretty straightforward. But you’ll never guess what most people miss when they add this little control to their DotNetNuke module.

Just like the ASP:Label control, internationalizing a LinkButton is a simple as adding a resourcekey attribute to the control. That much works just like the label control.

But what most people don’t find out until they try to apply a skin and find out that their link button doesn’t look anything like the other link buttons in DotNetNuke, is that you also have to set the cssClass attribute to “CommandButton”.

So, a LinkButton that would normally look something like this:

<asp:LinkButton ID="linkButton1"
runat="server" Text="Link Text" />

Will end up looking more like this:

<asp:LinkButton ID="linkButton1" resourcekey="linkButton1"
runat="server" cssClass="CommandButton">Optional Link Text</asp:LinkButton>

As I explained last Wednesday, I don’t always put in default text, but in this case, I think it might be wise to put in something.

 

Other post in DotNetNuke - Module Development

Related Post

  • DotNetNuke Modules – Creating Base ModulesDotNetNuke Modules – Creating Base Modules Now that we have DotNetNuke installed into Visual Studio we can go ahead and create our first modules. Actually, creating the modules is pretty simple. But it is even easier to do it wrong, which...
  • DotNetNuke Modules – Labels w/ no HelpDotNetNuke 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 associat...
  • DotNetNuke – InternationalizationDotNetNuke – Internationalization One of the core features of DotNetNuke is that all of the text that shows up on a page either comes out of the database or out of resource files.  Anything that comes out of the resource files can ...
  • DotNetNuke – Modules – Linking within the moduleDotNetNuke – Modules – Linking within the module Now that we have the module skeleton up and running and we have a data access layer, the next thing we need to look at is specific functions you may need to use from within your code. One of the m...
  • DotNetNuke Modules – Registering Your ModuleDotNetNuke Modules – Registering Your Module Yesterday, we used the DotNetNuke template to create a skeleton module and it's supporting files. Today, we want to get those modules registered into our Visual Studio copy of DotNetNuke so that a...