Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1619
  • Last Modified:

How do I programmatically access global resources?

Let's assume I have a web application with the following files:
C:/Inetpub/wwwroot/Default.aspx
C:/Inetpub/wwwroot/Black/App_GlobalResources/black.resx
So, the root of the web application is C:/Inetpub/wwwroot/.

And black.resx has the following data structure:
<root> ...
<data name="pie" xml:space="preserve">
<value>Custard Pie</value>
</data></root>

From Default.aspx, how can I programmatically access the contents of Black.resx?
Right now I'm just loading that file up into an XMLDocument object.  But I'd really like to be able to use something like ResourceManager so I can get at my data keys more easily.
0
matango
Asked:
matango
1 Solution
 
David H.H.LeeCommented:
hi matango,
You can refer how to use ResourceManager to access global resources dynamically:
http://www.west-wind.com/WebLog/posts/99699.aspx

For more details regarding how to arrange global resources in more details:
http://msdn.microsoft.com/en-us/library/ms227427.aspx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now