我有一个名为filetypes.resx的资源文件,我已经想出了如何将资源值绑定到下拉列表,但我不知道如何对ResourceSet的值进行排序。
到目前为止,我所做的是: FileTypes.resx
非常感谢您的提前帮助:)
到目前为止,我所做的是: FileTypes.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();
结果
A C B
As you can see the result is not sorted. Please help me to solve this issue.
非常感谢您的提前帮助:)