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: 609
  • Last Modified:

asp.net Resource.resx

my web app has Resource.resx there for my website name convention. everything works just fine. I have Lblcompany as name and "test" as Value

Now, I have separate wcf project and I added the my web app reference there.
my questions. how can I call the content from the resource.resx like I need to call
Lblcompany and get the value which is 'test' in this case?

Thanks
0
solution1368
Asked:
solution1368
1 Solution
 
Miguel OzSoftware EngineerCommented:
It depends how your web project is using the resx file:
Alternative 1: Add the resource file to WCF project as link.
http://stackoverflow.com/questions/39065/referencing-resource-files-from-multiple-projects-in-a-solution
No change to your asp.net project, but you need to remember you are sharing this file among projects

Alternative 2: Create a dll file.
http://stackoverflow.com/questions/2771130/read-resources-from-a-dll-file
My prefered solution because it clearly identifies where the resources are, but you may have to change your asp.net project a lot because the resource is now in a different location.
0
 
solution1368Author Commented:
mas_oz2003: I am not very good in asp.net code behind part, if you can show me the working codes, that will be great. Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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