Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to bind DropDown to an array?
Message
From
21/06/2005 13:30:14
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
How to bind DropDown to an array?
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01025218
Message ID:
01025218
Views:
76
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
Next
Reply
Map
View

Click here to load this message in the networking platform