Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populate a lot of label controls with data from an array..
Message
From
06/03/2008 12:15:24
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Populate a lot of label controls with data from an array..
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01299345
Message ID:
01299345
Views:
64
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
Map
View

Click here to load this message in the networking platform