private void OrderListItems(System.Web.UI.WebControls.ListControl lc, string[] textValues) {
ArrayList al = new ArrayList();
foreach (System.Web.UI.WebControls.ListItem li in lc.Items) {
al.Add(li);
}
lc.Items.Clear();
foreach (string s in textValues) {
foreach (System.Web.UI.WebControls.ListItem li in al) {
if (li.Text == s) {
lc.Items.Add(li);
}
}
}
}