Explicit localization problem

Posted by X-Dev on Stack Overflow See other posts from Stack Overflow or by X-Dev
Published on 2010-03-02T04:41:39Z Indexed on 2010/03/15 22:29 UTC
Read the original article Hit count: 327

Filed under:
|

when trying to translate the confirmation message to Norwegian i get the following error:

Cannot have more than one binding on property 'OnClientClick' on 'System.Web.UI.WebControls.LinkButton'. Ensure that this property is not bound through an implicit expression, for example, using meta:resourcekey.

i use Explicit localization in the following manner:

<asp:LinkButton ID="lnkMarkInvoiced" runat="server" OnClick="lnkMarkInvoiced_OnClick"
            OnClientClick="<%# Resources: lnkMarkInvoicedResource.OnClientClick%>"
            Visible="False" CssClass="stdtext" meta:resourcekey="lnkMarkInvoicedResource" ></asp:LinkButton>

here's the local resource file entry:

  <data name="lnkMarkInvoicedResource.OnClientClick" xml:space="preserve">
<value>return confirm('Er du sikker?');</value>

if i remove the meta attribute i get the English text(default). how do i get the Norwegian text appearing without resorting to using the code behind?

Update:

removing the meta attribute prevents the exception from occurring but the original problem still exists. I can't get the Norwegian text to show.

only the default English text shows.

Another Update:

I know this question is getting old but i still can't get the Norwegian text to display. If anyone has some tips please post a response.

© Stack Overflow or respective owner

Related posts about localization

Related posts about ASP.NET