Rob T
1/14/2003 8:53:00 PM
I'm trying to dynamicaly add a button into a table and can't figure out how
to code it. I have no problem doing other controls like TextBox or even
custom controls. When I try to dim it "dim myButton = as new Button()" I
get the little squiggle under Button() which says 'New' cannot be used on a
class that is declared 'MustInherit'
Below is a working snippit of how I would add a TextBox control....shouldn't
a button work the similar way???
Dim ctlBox As New Control()
r = New TableRow()
c = New TableCell() ' Qty Cell
ctlBox = New TextBox()
ctlBox.ID = "boxQty"
c.Controls.Add(ctlBox)
r.Cells.Add(c)