On Aug 21, 5:39 pm, nws_rea...@yahoo.com wrote:
Thanks for your response. ResourceManager is something I'm struggling
with.
The link you provided, and other sites I've found seem to be targeting
Web applications, not web services, or not 2005 web services.
From the link you provided
ResourceManager rm = new ResourceManager("MyApplication.res", Assembly.GetExecutingAssembly())
What is considered to be "MyApplication" when I have a web service and
not a web app. I tried the name of the project, the namespace, the
class ... nothing works. I always get the following error
"Could not find any resources appropriate for the specified culture or
the neutral culture"
Any ideas?
You need to use the ResourceManager class, see if this link gets you
started..
http://www.sliver.com/dotnet/articles/resinweb.aspx
Ron
MyApplication is the name of the resource that resides in the DLL.
For a DLL, not sure about using Assembly.GetExecutingAssembly(),
another alternative is to use a object type that is defined in the
same DLL as the resources. e.g.
ResourceManager rm = new ResourceManager("MyApplication.res",
typeof(objectInDll).Assembly)
I sometimes create a wrapper object around the resources and place it
in the same DLL, and actually use it as the object in the 'typeof'.
A possibly easier method is to add a Resource RESX file to your DLL
project. This will create a resx file such as Resource1.resx, and
also a designer file such as Resource1.Designer.cs. Add some strings
to the RESX file via the Designer, and then if you right click on the
designer file and click on Code, you will see a generated class that
provides a wrapper and accessors for the strings that you have added.
This should hopefully serve as an example also.
Ron