Yes, oddly enought, this only seems to work for labels. Im sure there is something I am missing. All of the following will give me errors (until I rem out all but the labels) Dim lbl As New Label() lbl.id = "lblHello" lbl.Text = "Hello" pg.Controls.Add(lbl)
Dim lbl2 As New Label() lbl2.Text = "Another Label" pg.Controls.Add(lbl2) 'Dim _lnk As New LinkButton() '_lnk.ID = "lnkID" '_lnk.Text = "Parent1" 'pg.Controls.Add(_lnk) 'Dim _txtbox As New Textbox() '_txtbox.Text = "test" 'pg.Controls.Add(_txtbox)
aikeith
Participant
1375 Points
276 Posts
Re: Add controls to current form from a class
Nov 04, 2002 12:25 PM|LINK