Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to bind DropDown to an array?
Message
De
21/06/2005 13:30:14
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
How to bind DropDown to an array?
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01025218
Message ID:
01025218
Vues:
74
I am working now on my first steps towards a production ASP.Net small app.

One requirement is to show a dropdown control to select a set of choices to select from.
These choices are mostly static but I do not want to hardcode them on the page or put them on a table. The idea would be to read them from XML at runtime in a BizObj. Reading XML is easy. What I don't yet get is even simpler: DropDown and Arrays.

As a test I dropped a control (VS Studio 2005 Beta 2). I created a separate class that declares and populates a simple array. How do I bind this array to the dropdown? An example would be appreciated (C#).

Note: One DropDown source will be XML that I will bind directly, another one will be an array and there is where I can't seem to be able to do it, if it can be done at all.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform