I have a resource file named filetypes.resx. Some how I figured out to bind the resource values to dropdownlist, but I don't know how to sort the values of ResourceSet.
Here is what I did so far,
FileTypes.resx
code to bind dropdownlist
DropDownList1.DataSource = Resources.FileTypes.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true);
DropDownList1.DataTextField = "Key";
DropDownList1.DataValueField = "Value";
DropDownList1.DataBind();
Result
A
C
B
As you can see the result is not sorted. Please help me to solve this issue.
Many thanks in advance :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…