title: Initialize ResourceManager dynamically
body: <p>I have this function and it works fine to get a translated value from this specific resource file called <em>OkayMessages</em>. </p>
  
  <pre><code>public static string GetResourceString(string resourceKey){
    ResourceManager resourceManager = Resources.OkayMessages.ResourceManager;
    return resourceManager.GetString(resourceKey);
  }
  </code></pre>
  
  <p>But i have more than 1 resource file and i want this function to get values from those files as well.. Only, i'm having trouble with dynamically/programmatically selecting the right resource(manager). 
  I have tried to use the code below, and some variants to that, but i always get an error. </p>
  
  <pre><code>public static string GetResourceString(string resourceFile, string resourceKey){
    ResourceManager resourceManager = new System.Resources.ResourceManager("Resources." + resourceFile, Assembly.GetExecutingAssembly());
    return resourceManager.GetString(resourceKey);
  }
  </code></pre>
  
  <p>The error i got most of the times was: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Resources.OkayMessages.resources" was correctly embedded or linked into assembly..</p>
  
  <p><strong>Update:</strong> I'm using the \App_GlobalResources\ folder for my resource files, and it seems that this is the problem. When i place a resource file in the root of my project, i can initialize a ResourceManager without problems.</p>