A
andyrich_1
HI,
I'm adding a usercontrol to a webform in the following way
Dim ctlRate As New ctlRatesTable
ctlRate.SomeMethod()
Me.Page.Controls.Add(ctlRate)
Where sub routine "SomeMethod" attempts to set the text property of a
lable webcontrol. The problem is that the lable hasn't been created.
I've tried calling EnsureChildControls() before using the lable control
but this hasn't helped.
Any ideas what I'm doing wrong?
Thanks,
Andy
I'm adding a usercontrol to a webform in the following way
Dim ctlRate As New ctlRatesTable
ctlRate.SomeMethod()
Me.Page.Controls.Add(ctlRate)
Where sub routine "SomeMethod" attempts to set the text property of a
lable webcontrol. The problem is that the lable hasn't been created.
I've tried calling EnsureChildControls() before using the lable control
but this hasn't helped.
Any ideas what I'm doing wrong?
Thanks,
Andy