Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populate a lot of label controls with data from an array..
Message
De
06/03/2008 12:15:24
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Populate a lot of label controls with data from an array..
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01299345
Message ID:
01299345
Vues:
65
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform