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

Leave a Reply

Comment Policy:

  • You must verify your comment by responding to the automated email that is sent to your email address. Unverified comments will never show.Leave a good comment that adds to the conversation and I'll leave your link in.
  • Leave me pure spam and I'll delete it.
  • Leave a general comment and I'll remove the link but keep the comment.

Notify me of followup comments via e-mail