How to localize web user controls inside a user control ? RRS feed

  • Question

  • User716467530 posted

    I have DefaultPage with MasterPage, two web user controls A.ascx and B.ascx. A.ascx is nesting B.ascx

    I created folder App_LocalResources and added there two files: B.ascx.resx and B.ascx.xx-XX.resx.

    Each resoource file has lblText.Text item.

    B.ascx has a label:

    <asp:Label id="lblText" runat="server" meta:resourcekey="lblText"/>

     <asp:label meta:resourcekey="txtText" runat="server" id="txtText">I'm trying to use this http://msdn.microsoft.com/en-us/magazine/cc163566.aspx methods to localize web user controls, but it doesn't work. Is there some trick for web user controls?</asp:label>

    Friday, February 25, 2011 5:04 PM


  • User-610330605 posted

    It should work.

    Did you create App_LocalResources in the same folder as B.ascx?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 1, 2011 8:54 AM