locked
resource files and separate class library RRS feed

  • Question

  • User65893105 posted

    I have a website that uses a business logic layer.  Inside this layer I have a method that returns an error message.  Im using localisation in the website and have several resource files in the App_GlobalResources directory.  As the business logic layer is a separate project, how can I get access to the resource files held in the website ?

    Monday, July 13, 2009 5:23 AM

Answers

  • User-25924017 posted

    App_GlobalResource directory contains application level resource, so if I think you can access those resource in same application using 

    HttpContext.GetGlobalResourceObject,

    For example:

    Object Error = HttpContext.GetGlobalResourceObject("GlobalResource", "Err0002", CultureInfo.CurrentCulture);

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 13, 2009 5:52 AM