I don't know how exactly to explain what I'm seeing, but I'll give it my best shot. I'm creating a series of dropdownlists that are all basically the same (category/subcategory lists) and I used ListItemCollection to add in the various items into each dropdownlist, rather than calling the database each time. At least...I tried to.
I retrieved the data and added it to the listitemcollection variable (Cats) here:
While Data_Reader.Read
Dim Cat_ID As Integer = Data_Reader("Cat_ID")
Dim Category As String = Data_Reader("Category")
Dim New_Item As ListItem = New ListItem(Category, Cat_ID)
Cats.Add(New_Item)
End While
And I add it to the list box using this sub that I wrote:
Private Sub PopulateCatBox(ByVal Cat_Box As DropDownList)
Cat_Box.DataSource = Cats
Cat_Box.DataBind()
Cat_Box.Items.Insert(0, New ListItem("-- Se ...
Go to the complete details ...