Global Resource File asp.net

最后都变了- 提交于 2019-12-23 05:08:45

问题


Okay below image is explaining everything.

i have also included the code for further explanation.

Thread.CurrentThread.CurrentCulture = New CultureInfo(Session("Lang").ToString())
Dim rm As ResourceManager = New ResourceManager("TodayTimesheet.App_GlobalResources.Lang", Assembly.GetExecutingAssembly())
Dim ci As CultureInfo = Thread.CurrentThread.CurrentCulture
btnSubmit.Text = rm.GetString("Add", ci)

Error message:

An exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll but was not handled in user code

Additional information: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "TodayTimesheet.App_GlobalResources.Lang.resources" was correctly embedded or linked into assembly "TodayTimesheet" at compile time, or that all the satellite assemblies required are loadable and fully signed.


回答1:


Nevermind ...

I have fixed the issue on my own by replacing the following line

 Dim rm As ResourceManager = New ResourceManager("TodayTimesheet.Lang", System.Reflection.Assembly.Load("TodayTimesheet"))


来源:https://stackoverflow.com/questions/29490866/global-resource-file-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!