views:

115

answers:

1

I need to get a string from resource file of page from utility class.

I tried

         ResourceManager resources = 
            new ResourceManager(
                "Company.Application.Folder.App_LocalResources.Page.aspx", 
                Assembly.GetExecutingAssembly());

        string value = resources.GetString("ResourceName");

but got an exception that resource not found. I tried "Company.Application.Folder.Page.aspx" as a path as well.

Could you please help me to compose the right resource path.

+1  A: 

You should go through the properties.

Company.Application.Properties.Resources.ResourceName

(Assuming Company.Application is the default namespace)

Joshua Belden