I've got an administrative page with a listbox filled with values. A user can also change the order of the values via some jquery, and in theory we'll save that order and it will change the order of display in a listbox in some other, exotic, locale.
The jquery works fine. When the user saves I use this code to process the listbox:
index = 0;
foreach (ListItem item in lstProspectStatus.Items)
{
//Save that particular item's data, using index as the value for the
//display sequence field.
index++;
}
The problem is, the Items collection is returning the order the items where in when the control was populated. The client-side order change is ignored.
What is the best way for me to approach this?