tags:

views:

43

answers:

2

If i wanted to get message for ViewData from resource file, depending on the culture i set, how can i do this?

ViewData["message"] = "ErrorMessage";

am i making sense

A: 

See this post

Gregoire
My message is being called from inside the master page and my resource files are also under the "shared" folder where the Site.Master is located.The blog's solution does not seem to work with master page
WingMan20-10
+1  A: 
ViewData["message"] = Resources.ErrorMessage;

where Resources is a resx file that you've added to your project. Visual Studio automatically generates strongly typed classes for each resource you add.

Darin Dimitrov