I\'m curious as to the best route (more looking towards simplicity, not speed or efficiency) to sort a DropDownList in C#/ASP.NET - I\'ve looked at a few recommendations b
Assuming you are running the latest version of the .Net Framework this will work:
List items = GetItemsFromSomewhere(); items.Sort((x, y) => string.Compare(x, y)); DropDownListId.DataSource = items; DropDownListId.DataBind();