Found the answer to my question.
for reference...
Dim newCell As New TableCell
Dim newRow As New TableRow
Dim productThumb As New Control
productThumb =
LoadControl("../userControls/htmlBlock_Produ ctThumb.ascx")
CType(productTh umb, htmlBlock_Produ ctThumb).itemSk u = "1001A"
newCell.Control s.Add(productTh umb)
newRow.Cells.Ad d(newCell)
FeaturedProduct s.Rows.Add(newR ow)
"Robin Bonin" <ro***@guavatoo ls.com> wrote in message
news:55******** ************@ea tel.net...
This worked great, I just have one problem.
I need to pass atleast one paramater to this control for the item ID to be
dsiplayed.
I declared the control as follows.
productThumb = LoadControl("../userControls/htmlBlock_Produ ctThumb.ascx")
but the public properties are not exposed though the productThumb control.
I tried passing a variable
through the querry string but I got an error. control needs to end with a
.ascx.
"S. Justin Gengo" <sj*****@aboutf ortunate.com> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. . Robin,
When you load a user control it's slightly different than creating a
dynamic control.
newCell.Control s.Add(LoadContr ol([Path to your user control as String])
And you won't need to create the user control before this so delete the
line:
Dim productThumb As New htmlBlock_Produ ctThumb ' This is my
usercontrol
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Robin Bonin" <ro***@guavatoo ls.com> wrote in message
news:3F******** ************@ea tel.net... I have a user control that create a product thumbnail and details. I
am working on aother user control that I will pass some variables like #
of columns and rows to display these thumbnails. I'm having trouble dynamicly adding a new thumbnail control to my table.
Dim newCell As New TableCell
Dim newRow As New TableRow
Dim productThumb As New htmlBlock_Produ ctThumb ' This is my
usercontrol
newCell.Control s.Add(productTh umb)
' Not sure how to add it to the table cell
newRow.Cells.Ad d(newCell)
FeaturedProduct s.Rows.Add(newR ow)