Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 如何以编程方式访问特定的资源文件?_Asp.net_Webforms - Fatal编程技术网

Asp.net 如何以编程方式访问特定的资源文件?

Asp.net 如何以编程方式访问特定的资源文件?,asp.net,webforms,Asp.net,Webforms,我的申请书有两种语言:英语和法语。 英语存储在Global.resx文件中 法语存储在Global.fr.resx文件中 我正在使用这些资源文件中的数据编写双语电子邮件通知 在编写法语版本时,如何通过编程访问Global.fr.resx的内容 Dim SelectedCulture As String = "fr-CA" Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(SelectedCulture)

我的申请书有两种语言:英语和法语。 英语存储在Global.resx文件中 法语存储在Global.fr.resx文件中

我正在使用这些资源文件中的数据编写双语电子邮件通知

在编写法语版本时,如何通过编程访问Global.fr.resx的内容

Dim SelectedCulture As String = "fr-CA"
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(SelectedCulture)
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture
'Code will now retrieve from the French resource file
Dim AppName as string= Resources.Strings.AppName