How to read asp.net page resource from utility class

I need to get a string from a page resource file from a 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 the resource was not found. I also tried "Company.Application.Folder.Page.aspx" as the path.

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

0


a source to share


1 answer


You have to go through properties.

Company.Application.Properties.Resources.ResourceName

      



(Assuming Company.Application is the default namespace)

+1


a source







All Articles