General information
Title:
Populate a lot of label controls with data from an array..
I am a beginner using Visual Basic.Net and I find myself needing to populate a lot of label controls with data from an array. Is it possible to refere to the label names with a variable? For example - if I have labels named label1 and label2, can I assign their text value at runtime with some kind of variable to indicate the number portion of the name. Something like labeli.text = "something", then increment i by 1 and then repeat the statement - only this time labeli now becomes label2. This way I can assign all the text values of each label with a loop instead of coding them all out individually.
Thanks for the help.
Bilal.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only