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.
Debug.Assert(SelectedIndex == -1);
Debug.Assert(SelectedIndex == 0);//is it correct?