Creating controls at runtime

B

Bart Schelkens

Hi,

i have a label on my webpage.
I want to create some copys of this label at runtime, since i don't know how
many labels i will be needing.

How can i do this?

Thx
 
L

Lucas Tam

i have a label on my webpage.
I want to create some copys of this label at runtime, since i don't
know how many labels i will be needing.

How can i do this?



Dim newLabel as Label()

For i = 0 as integer to NumLabel
newLabel = new Label()
PlaceHolder.controls.add(newLabel)
Next

PlaceHolder is a placeholder on your page
 
B

Bart Schelkens

And if I was to buttons this way, how would I write the onclick-event of
those buttons ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top