If I sort my ListBox with an ArrayList like this:
ArrayList lbArray = new ArrayList();
//add the Items to ArrayList without sort
for (int i = 0; i < CommitteeMemberListBox2.Items.Count; i++ )
{
lbArray.Add(CommitteeMemberListBox2.Items[i].Text); //sorting by Text value
}
CommitteeMemberListBox2.Items.Clear();
lbArray.Sort();
CommitteeMemberListBox2.DataSource = lbArray;
CommitteeMemberListBox2.DataBind(); the problem is that if I set my datasource to the contents of the ArrayList, when the page is loaded nothing will be initially in the ListBox, but I need it to be populated. So what I was using instead of setting the DataSource to the contents of the ArrayList ...
Go to the complete details ...