I have a resource file called filetypes.resx. Some of how I decided to associate resource values ββwith a drop-down list, but I donβt know how to sort ResourceSet values .
Here is what I have done so far,
FileTypes.resx
code for binding dropdown list
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.
Thank you very much in advance:)
source
share