<p>Let's say I have the following simple enum:</p>

<pre><code>enum Response
{
    Yes = 1,
    No = 2,
    Maybe = 3
}
</code></pre>

<p>How can I bind this enum to a DropDownList control so that the descriptions are displayed in the list as well as retrieve the associated numeric value (1,2,3) once an option has been selected?</p>

I probably wouldn't
bind
the data as it's an enum, and it won't change after compile time (unless I'm having one of those
stoopid
moments).
Better just to iterate through the enum:
```
```
Dim itemValues As Array = System.Enum.GetValues(GetType(Response))
Dim itemNames As Array = System.Enum.GetNames(GetType(Response))

For i As Integer = 0 To itemNames.Length - 1
    Dim item As New ListItem(itemNames(i), itemValues(i))
    dropdownlist.Items.Add(item)
Next
```
```
Or the same in C#
```
```
Array itemValues = System.Enum.GetValues(typeof(Response));
Array itemNames = System.Enum.GetNames(typeof(Response));

for (int i = 0; i <= itemNames.Length - 1 ; i++) {
    ListItem item = new ListItem(itemNames[i], itemValues[i]);
    dropdownlist.Items.Add(item);
}
```
```