title: What is my HttpContext.GetLocalResourceObject Method Virtual Path?
body: <p>I have read <a href="http://msdn.microsoft.com/en-us/library/ms149953.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms149953.aspx</a> and need to verify what is my <code>GetLocalResourceObject</code> virtual path.</p>
  
  <p>My local resource files are located on my pc at:  </p>
  
  <p>C:\inetpub\wwwroot\GlobalX\Input\App_LocalResources</p>
  
  <p>Within this folder are my resource files for all the languages that site handles (InputContactDetails.aspx.ro.resx,  InputContactDetails.aspx.hi.resx, etc.), as well as the default resource file (InputContactDetails.aspx.resx).</p>
  
  <p>I am receiving an error when I attempt to implement the virtual path string. Below is my line of offending code:</p>
  
  <pre><code>return '&lt;%= HttpContext.GetLocalResourceObject("~/GlobalX/Input/App_LocalResources/InputContactDetails.aspx.resx", "ContactDetails.Text", new System.Globalization.CultureInfo("ro")) %&gt;';
  </code></pre>
  
  <p>I have tried <code>~/GlobalX/Input/App_LocalResources</code> as the virtual path, and several other permutations, but I get the same error.</p>
  
  <p>If someone could show what I am doing wrong, I would appreciate it greatly.</p>
  
  <p>Here is the error message I am getting:</p>
  
  <blockquote>
    <p>The resource class for this page was not found. Please check if the
    resource file exists and try again.</p>
    
    <p>Description: An unhandled exception occurred during the execution of
    the current web request. Please review the stack trace for more
    information about the error and where it originated in the code. </p>
    
    <p>Exception Details: System.InvalidOperationException: The resource
    class for this page was not found. Please check if the resource file
    exists and try again.</p>
    
    <p>Source Error: </p>
    
    <p>Line 410:     function languageContactPromptPhone(var_lcs) { Line
    411:          if (var_lcs == "af") { Line 412: return '&lt;%=
    HttpContext.GetLocalResourceObject("~/GlobalX/Input/App_LocalResources/InputContactDetails.aspx.resx",
    "ContactDetails.Text", new System.Globalization.CultureInfo("ro"))
    %>'; Line 413:            } Line 414:         else if (var_lcs == "sq") {</p>
    
    <p>Source File: c:\inetpub\wwwroot\GlobalX\Input\InputContactDetails.aspx
    Line: 412 </p>
    
    <p>Stack Trace: </p>
    
    <p>[InvalidOperationException: The resource class for this page was not
    found.  Please check if the resource file exists and try again.]<br>
    System.Web.Compilation.LocalResXResourceProvider.CreateResourceManager()
    +2785818    System.Web.Compilation.BaseResXResourceProvider.EnsureResourceManager()
    +24    System.Web.Compilation.BaseResXResourceProvider.GetObject(String
    resourceKey, CultureInfo culture) +15<br>
    System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider
    resourceProvider, String resourceKey, CultureInfo culture, Type
    objType, String propName) +23<br>
    System.Web.HttpContext.GetLocalResourceObject(String virtualPath,
    String resourceKey, CultureInfo culture) +38<br>
    ASP.input_inputcontactdetails_aspx.__RenderContentInputContactDetails(HtmlTextWriter
    __w, Control parameterContainer) in c:\inetpub\wwwroot\GlobalX\Input\InputContactDetails.aspx:412<br>
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children) +109<br>
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8<br>
    System.Web.UI.Control.Render(HtmlTextWriter writer) +10<br>
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +27<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +8991378<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25<br>
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children) +208<br>
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8<br>
    System.Web.UI.Control.Render(HtmlTextWriter writer) +10<br>
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +27<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +8991378<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25<br>
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children) +208<br>
    System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) +256<br>
    System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +37<br>
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +27<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +8991378<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25<br>
    ASP.masterpages_masterinput_master.__RenderformMasterInput(HtmlTextWriter
    __w, Control parameterContainer) in c:\inetpub\wwwroot\GlobalX\MasterPages\MasterInput.master:140<br>
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children) +109<br>
    System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter
    writer) +173<br>
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter
    writer) +31<br>
    System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53 
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +27<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +8991378<br>
    System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter
    writer) +40<br>
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children) +208<br>
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8<br>
    System.Web.UI.Control.Render(HtmlTextWriter writer) +10<br>
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +27<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +8991378<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25<br>
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children) +208<br>
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8<br>
    System.Web.UI.Page.Render(HtmlTextWriter writer) +29<br>
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +27<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +8991378<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25<br>
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    +3060</p>
  </blockquote>