I've created user controls that contain listboxes that are dynamically
populated from the database. In the html view of the user control
(ucSectorsIndustries.ascx) is the <asp:listbox id="lbSector"
runat="server" Rows="5"></asp:listbox> code. In the codebehind I have
Protected WithEvents lbSector As System.Web.UI.WebControls.ListBox
On Page_Load of the user control I have
For i As Integer = 0 To 5
lbIndustry.Items.Add(New ListItem("----", ""))
This usercontrol works great in a page on which it is dropped via the
GUI, but on another page where it is loaded like this:
Dim mySectorsIndustries As ucSectorsIndustries = New
it seems to ...