0

How can I read global resource file in MVC controller, I am using this code and it is not working

 Resources.BillingResource.Error;

returns the following exception

Could not load file or assembly 'Resources' or one of its dependencies. The system cannot find the file specified.

My application is MVC 4 and framework 4.5

Please advice

Yasser-Farag
  • 592
  • 4
  • 9
  • 28
  • Can you please double check whether you have the "BillingResource" file within App_GlobalResources folder? Also make sure the build action of this file set to "Content" – Spock Oct 28 '13 at 11:57

1 Answers1

0

Is the resource file loaded in the same project or is on the different project. If its different project , you would have to add the reference to it.

Also check the namespace generated by the cs file of the resource file and reference that in your view or controller.

Matt
  • 2,866
  • 2
  • 17
  • 16