asp.net: How do I reuse a label?

Gunslinger08

Lifer
Nov 18, 2001
13,234
2
81
I have to print the same thing several times on a page, and it seems pointless to make multiple labels and set them each to the same value in the codebehind. How can I reuse the same label?
 

KB

Diamond Member
Nov 8, 1999
5,406
389
126
You can't reuse a label control, but you can dynamically add new labels.

Dim lbl1 As new Label
lbl1.Text = Me.lblCopied.Text
Page.Controls.Add(lbl1)