Exception: Failed to compare two elements in the array.
private void assignNames(DropDownList ddl, Hashtable names)
{
List<ListItem> nameList = new List<ListItem>();
if (ddl != null)
{
ddl.ClearSelection();
ddl.Items.Add(new ListItem("Select Author"));
foreach (string key in names.Keys)
{
nameList.Add(new ListItem(names[key].ToString(), key));
}
nameList.Sort();
}
So how can I use Sort() to compare on the "names" and not get stuck on the key?