Click here to Skip to main content
15,915,501 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In my project there is a requirement to keep resource files in to the sub folders i.e. myresource.resx file should be kept in "App_GlobalResources/myfolder/myresource.resx". I do not want to keep my resource file directly under the "App_GlobalResources" folder. Now when I am reading the key/value from the resource file it is returning null. But when I am putting a new resource file (say test.resx) directly under the "App_GlobalResources" folder then I am able to read the values from "App_GlobalResources/myfolder/myresource.resx". I am using following code to read the key/ value.
C#
HttpContext.GetGlobalResourceObject("MyResource", "address");

Please let me know how can I read the values from myresource file without keeping any resource file directly under the "App_GlobalResources" folder.

Thanks in Advance,
Alok Kumar
Posted
Updated 10-Feb-12 0:24am
v2

1 solution

You can create local resource file then you can read them from aspx page or
C#
HttpContext.GetLocalResourceObject("MyResource", "address");

but i dont understand what is the problem in Global why you want to change
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900