I have about 20 asp: labels on my ASP page, all with ID = "lbl #" , where # ranges from 0 to 22. I want to dynamically change what they say. Although I could write
lbl1.Text = "Text goes here"
for all 23 of them, I would like to know if there is a way to iterate over all of them and change their text.
I thought about creating an array with all my labels, and then just looped For everyone , but I also need to check if this element exists with IsNothing. I'm changing my text, so I'm stuck there.
If anyone can help me, I really really appreciate that!
Thank you so much for your help!
source share