As the question says, I'm working on ASP.NET . I have a listbox
and when I enter the properties I do not get Sorted . I have visual 2017, did something similar happen to someone?
Greetings and thanks.
As the question says, I'm working on ASP.NET . I have a listbox
and when I enter the properties I do not get Sorted . I have visual 2017, did something similar happen to someone?
Greetings and thanks.
If someone serves, I could order the listbox with this code finally:
System.Collections.SortedList sorted = new SortedList();
foreach (ListItem ll in ListBox1.Items)
{
sorted.Add(ll.Text, ll.Value);
}
ListBox1.Items.Clear();
foreach (String key in sorted.Keys)
{
ListBox1.Items.Add(new ListItem(key, sorted[key].ToString()));
}