I have an enumeration with some data about this, also I have a resource file with the same enumeration data, but using a different translation
Ex.
enum test { Sun =1, Mon = 2 } The resource file : Text.resx Sun --> Sunday Mon --> Monday
Now I want to get the value from the resource file, but not using
string data = Resources.Text.Sun;
but using my enum value, I found some code, but I have an exception, the code is as follows:
string resourceFile = "~/App_GlobalResources/Text.resx"; string filePath = System.AppDomain.CurrentDomain.BaseDirectory.ToString(); ResourceManager resourceManager = ResourceManager.CreateFileBasedResourceManager(resourceFile, filePath, null); string resourceValue = resourceManager.GetString(myEnum.ToString());
and I got the following exception
Could not find resources suitable for the specified culture (or neutral culture) on the disk. BASENAME: ~ / App_GlobalResources / Text.resx locationInfo: fileName: ~ / App_GlobalResources / Text.resx.resources
please help as soon as you can
Thanks at Advance
source share