G
Guest
I am missing something realy basic here.
If I create a control programmaticly and then assign it to a control that
has already been placed on the page at designe time it does not appear to
render correctly.
example:
I have created a page in the designer with two controls
a label control called lbl1
and a textbox control called tb1
I have the following code in my pageLoad
Dim tbPreset As New TextBox
tbPreset.Text = "hello world"
tb1 = tbPreset
lbl1.Text = tb1.Text
When I run this the textbox is empty BUT the label contains "Hello World"
Can you tell me why this dosnt work?
and how I can make this kind of thing work as I am trying to create a class
that returns a control(a dropdownlist) and then get it to display.
thanx for helping a newbie
If I create a control programmaticly and then assign it to a control that
has already been placed on the page at designe time it does not appear to
render correctly.
example:
I have created a page in the designer with two controls
a label control called lbl1
and a textbox control called tb1
I have the following code in my pageLoad
Dim tbPreset As New TextBox
tbPreset.Text = "hello world"
tb1 = tbPreset
lbl1.Text = tb1.Text
When I run this the textbox is empty BUT the label contains "Hello World"
Can you tell me why this dosnt work?
and how I can make this kind of thing work as I am trying to create a class
that returns a control(a dropdownlist) and then get it to display.
thanx for helping a newbie