2015-04-07 113 views
0

好的下面的图像是解释一切。全球资源文件asp.net

My Issue

我也包括用于进一步解释的代码。

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) 

错误消息:

型“System.Resources.MissingManifestResourceException”的异常出现在mscorlib.dll,但在用户代码中没有处理

其他信息:找不到任何适合特定文化或中性文化的资源。确保在编译时将“TodayTimesheet.App_GlobalResources.Lang.resources”正确嵌入或链接到程序集“TodayTimesheet”中,或者确保所需的所有附属程序集均可加载并完全签名。

+0

看到http://stackoverflow.com/questions/2058441/could-not-固定在我自己的问题发现,任何资源,适当换的规定,文化或最诺伊特拉 – 111

回答

0

没关系......

我已经通过替换以下行

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