Create label at run time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I would like to create a label at runtime and show it on a web form, but once i create doesn't appear anywher
How can I add the control on the web form so I can see it
thank yo
Fabrizio
 
=?Utf-8?B?RmFicml6aW8=?= said:
I would like to create a label at runtime and show it on a web form, but
once i create doesn't appear anywhere How can I add the control on the
web form so I can see it ? thank you

Your question is certainly welcome here, but you'll have a better chance of
someone knowing the answer in the .aspnet group.

How are you creating it? That is waht does you code look like?

If you look at the designer generated code for a sample label, does it look
similar and are you passing the same values / property values?


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
Fabrizio said:
Hi,
I would like to create a label at runtime and show it on a web form, but
once i create doesn't appear anywhere
How can I add the control on the web form so I can see it ?


Hi Fabrizo,

You should be able to instantiate a new Label object and add it to the
form's Controls collection.

Joe
 
Joe Mayo said:
once i create doesn't appear anywhere


Hi Fabrizo,

You should be able to instantiate a new Label object and add it to the
form's Controls collection.


Please ignore my comment - I overlooked the fact that he said "Web Form" and
not "Windows Form".

Joe
 
Back
Top