【发布时间】:2009-11-09 19:22:45
【问题描述】:
我有一个名为 filetypes.resx 的资源文件。我想出如何将资源值绑定到下拉列表,但我不知道如何对 ResourceSet 的值进行排序。
这是我到目前为止所做的,
文件类型.resx
- 名称、值
A,1
B,2
C,3
绑定下拉列表的代码
DropDownList1.DataSource = Resources.FileTypes.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true);
DropDownList1.DataTextField = "Key";
DropDownList1.DataValueField = "Value";
DropDownList1.DataBind();
结果
一个 C 乙As you can see the result is not sorted. Please help me to solve this issue.
提前非常感谢:)
【问题讨论】:
标签: c# resources asp.net-3.5