Last post Apr 21, 2007 01:36 PM by vivek_iit
Apr 18, 2007 10:08 AM|DBA|LINK
I'm trying to read a string value from a resource file, located in the Global_Resources ASP.Net folder. The resource file name is: LangStaticText.resx.
The code I'm using to retrieve such value is:
ResourceManager rm = new ResourceManager("LangStaticText", Assembly.GetExecutingAssembly());
This code throws me the following exception:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "LangStaticText.resources" was correctly embedded or linked into assembly "App_Web_llk9-vs9" at compile time, or that all the satellite assemblies required
are loadable and fully signed.
Could someone help me fix this error?
Apr 21, 2007 01:36 PM|vivek_iit|LINK
I suggest you use an easier way to access the resource values. In ASP.NET 2.0 the reosurces files are automatically compiled into strongly typed classes which you can use directly from you code as:
String welcome = Resources.TestSiteResources.Welcome;
Refer to this article for details:
Hope this helps,