开发者

MVC Localization ViewData["message"]

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

ViewData["messag开发者_如何学Goe"] = "ErrorMessage";

am i making sense


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜