Adding user control to a panel.

  • Thread starter Thread starter Marc Bishop
  • Start date Start date
M

Marc Bishop

i want to repeat a user control multiple times and add each instant to a
panel.

i know to add to the panel
pnlProduct_Display.Controls.Add ()
i call my user control:
<Products:List id="ProductsList_Search" runat="server"/>
and in the code call the sql place it in the control (the control returns a
table with a product):
ProductsList_Search.strSQL = "SELECT * FROM Products WHERE ID=" &
myReader("ID").toString

my question is how do i add multiple instances of this usercontrol to the
panel.
to list product after product after product.?

thanks in advance.
Marc
 
dim product as controlyouwant


while rs.read()
product = new controlyouwant
product.id = rs("id")
nlProduct_Display.Controls.Add (product)
end while

Mike
 
Back
Top