silent200
silent200

Reputation:

How to read GlobalResources in ASP.NET MVC Controller?

I can't find a way to read resource values in a controller

Upvotes: 4

Views: 3921

Answers (1)

Todd Smith
Todd Smith

Reputation: 17272

If you're referring to string resources stored in App_GlobalResources then you can add a

using Resources;

and access them via

Strings.<name of resource>

or use

Resources.Strings.<name of resource>

Upvotes: 8

Related Questions