I have a custom DropDownList derived from System.Web.UI.WebControls.DropDownList.
And I've noticed that after populating data using ListItemCollection.AddRange Method, the DropDownList.SelectedIndex Property becomes set to 0 from -1.
I consider this as an unexpected behavior and have to change it back to -1- unselected.
Items.Clear();
Debug.Assert(SelectedIndex == -1);
Items.AddRange(cachedItems);
Debug.Assert(SelectedIndex == 0);//is it correct?