locked
Localization works in aspx.vb but not in .vb module RRS feed

  • Question

  • User-130631058 posted

    Please - Help - I have years of experience with ASP but I'm just getting started with ASP.NET and I'm implementing localization mostly using samples from the toolkit.

    When I call the rm.getstring method from within the ....ASPX.VB files it works perfectly.

    But I want to have a module with shared functions so that I can re-use code snippets in different reports and screens when building pages (always display name and addres for example with a common format). At runtime the rm.getstring method is called from inside of the module I get the error:
     System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly.

    The method that I am using for setting culture is initializing in the application on start.

    ' Fires when the application is started
    Application("rm") = New ResourceManager("PEMDReports.Resource", System.Reflection.Assembly.GetExecutingAssembly())

    Then in the Application_BeginRequest I am setting the culture.

    I thought that maybe this had not fired when I called the function in my module so I tried setting the culture directly in my module just before I call the getstring method and it does not work.

     From within the module I am calling the function with the syntax:

    System.Web.HttpContext.Current.Application("rm").GetString

    I get 0 errors when compiling.

    Thanks to anyone who can help me on this.

    Wednesday, April 12, 2006 9:16 AM

All replies

  • User-130631058 posted

    Well - I solved this one myself - and as I said I'm a newbie at ASP.NET but maybe I can save someone else from running into this error.

    The error message was misleading - if it had said "missing key" or something I would have figured it out sooner. On one form I was using strWebSite as the key and in the place where it was not working it was strWebsite - So - The keys are case sensitive and I have wasted quite a few hours figuring this out, but maybe I can save someon else this problem.

     

     

    Thursday, April 13, 2006 12:09 PM