Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8465065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:56:09+00:00 2026-06-10T14:56:09+00:00

i have a component project with controls for our site – that must now

  • 0

i have a component project with controls for our site – that must now be localization-able. setting up the localization for the rest of the site was not a problem (we dropped .resx files into the App_GlobalResources directory; everything was hunky-dory), but i’m having a difficult time finding information on how to access resources locally within the component project.

  • the App_Local[/Global]Resources folders don’t want work – i can’t “Add ASP.NET Folder” the way i can from the main project.
  • when i generate it myself and drop .resx files into it, i can’t figure out how to access them like i did in the site.

some abbreviated control code, contained entirely within ThisWidget.cs in the component project:

namespace site.shop {
  [ToolboxData("<{0}:ThisWidget runat=server></{0}:ThisWidget>")]
  public class ThisWidget : WebControl {
    protected override void CreateChildControls() {
      if (ChildControlsCreated) { return; }
      this.Controls.Clear();
      Label head = new Label();
      head.CssClass = "header";

      // fails: ThisWidget does not exist in namespace
      head.Text = System.Resources.ThisWidget.Label_head;
      // fails: can't find GetLocalResourceObject
      head.Text = new System.Web.UI.TemplateControl.GetLocalResourceObject("Label_head");
      // fails: can't find linked or embedded resources
      System.Resources.ResourceManager rm = new ResourceManager();
      head.Text = Convert.ToString(rm.GetObject("Label_head"));

      this.Controls.Add(head);
    }
  }
}

and several variations with/out new, System.Web.UI.TemplateControl, etc…

i’d prefer not to have to compile this as a satellite assembly and then pull it back in (which seemed to be the other option), since the component project (a) has a number of related controls, and (b) is sort of a satellite dependency already, right? my hope was that i could drop the .resx files in, compile the .DLL, then the rest of the project can work.

[edit]
i feel like i’m getting closer to the answer, but i’m just not quite there yet…

any ideas? what am i missing?

thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:56:11+00:00Added an answer on June 10, 2026 at 2:56 pm

    oh, i was getting close – i popped open the ThisWidget.Designer.cs and found the correct parameters to call ResourceManager() with:

    ResourceManager rm = new ResourceManager("Components.App_LocalResources.ThisWidget", typeof(ThisWidget).Assembly);
    head.Text = Convert.ToString(rm.GetObject("Label_head"));
    

    seems to work like a charm. i also realized that since it is ignoring the specialness of App_LocalResources, i could put it anywhere, so i made a /Resources/Resx/ directory and put the .resx files for each of the components’ controls in with it. to update the call, this:

    ResourceManager rm = new ResourceManager("Components.Resources.Resx.ThisWidget", typeof(ThisWidget).Assembly);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET 3.5 WinForms project that uses several 3rd party controls and
I've just imported a Flex component into my project. I have a theory question
I have a web project with devexpress component ASPxGridView. So I want to know
So I am starting out on company project that will have several components: At
I have a project that has components in several different directories and would like
I have an user control in our library that I need to inherit and
We have an old Silverlight UserControl + WCF component in our framework and we
I have a Flex3 project with 2 HorizontalList controls; one of which has drag
I have a Flex component that, instead of inheriting directly from Canvas, inherits from
I have a C++ Builder XE project with several 3rd party controls. Some of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.