locked
Nested ascx control won't localize RRS feed

  • Question

  • User248084892 posted

    I'm building a site that has some nested user controls. For example, I have a user control that contains a DetailsView called OfferDetails.ascx wihich is embeded in another control called MyOffers.ascx. They are also in different directories.

    Here is the directory structure:

    • root
      • App_LocalResources
        • MyOffers.ascx.resx
      • Controls
        • App_LocalResources
          • Offers.ascx.resx
        • Offers.ascx
      • MyOffers.ascx

    I am localizing by hand because VWD doesn't have Generate Local Resource.

    When I localize MyOffers.ascx it works just fine. But when I try to localize Offers.ascx I get "RESX:lblTitle.Text" where the text should be. I tried moving the resource file to the root which did the same thing. I have tried a number of things but nothing seems to work. Why does it display that "RESX:..." message? Does it mean it can find the file?

    Saturday, March 31, 2012 4:57 AM

Answers

  • User248084892 posted

    I found the answer(s) at: http://www.dotnetnuke.com/Resources/Forums/forumid/77/postid/206554/scope/posts.aspx#206554

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 2, 2012 11:30 AM

All replies

  • User1954304945 posted

    Hi, please add:

    meta:resourcekey="NameInResourceFile"

    to the controls in “Offers.ascx”, for more detail information, you can refer to the following site:

    http://msdn.microsoft.com/en-us/library/ms227427.aspx

    Monday, April 2, 2012 4:14 AM
  • User248084892 posted

    I found the answer(s) at: http://www.dotnetnuke.com/Resources/Forums/forumid/77/postid/206554/scope/posts.aspx#206554

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 2, 2012 11:30 AM