0

I am trying to access a resx in c# codebehind.

I've seen this answer: read string from .resx file in C#

, but have no idea what to put in place of "items" in this statement:

ResourceManager rm = new ResourceManager("items", Assembly.GetExecutingAssembly());

where can i see the namespace of the resx?

Thanks

Community
  • 1
  • 1
raklos
  • 28,027
  • 60
  • 183
  • 301
  • 1
    Is this resx file in your project? Do you know what resx file you're trying to read, or is it dynamic? See http://msdn.microsoft.com/en-us/library/yfsz7ac5.aspx – Tim S. Nov 04 '13 at 15:52
  • @TimS.Yes I have the resource in my project under a folder pages/app_localResources/MyPage.aspx.resx – raklos Nov 04 '13 at 15:54

1 Answers1

0

Is this what you are trying to do?

 string foo = GetLocalResourceObject("NameOfTheResource").ToString();
smoore4
  • 4,520
  • 3
  • 36
  • 55