【发布时间】:2014-09-09 17:45:47
【问题描述】:
假设我有 2 个资源文件;一个叫HomeEN.resx,另一个叫HomeFR.resx。我查看了在线教程,这些教程显示了如何根据用户在浏览器中的设置自动选择资源文件。
我想在运行时选择资源文件,像这样:
protected void Page_Load(object sender, EventArgs e)
{
switch (TheLanguage) {
case 1:
// select the English file HomeEN.resx;
break;
case 2:
// select the French file HomeFR.resx;
break;
}
}
我该如何写这些语句?
【问题讨论】:
-
这是一个windows程序吗..你看过
WindowsFormsApplication1.Properties.Resources用你的表单名称替换WindowsFormsApplication1吗.. -
不,这是一个使用 webforms 的 asp.net 网站
标签: c# asp.net resource-files