Mapping enum values to a drop down (combobox) list in ASP.NET
<p>I have an ASP.NET page with a drop down (asp:DropDownList) control. I also have a defined ENUM</p>

<pre><code>Public Enum myEnumType As Integer
  A
  B
  C
End Enum
</code></pre>

<p>I want to define the "value" property of each asp:ListItem with one of the ENUM value (A,B,C  represented as a string of course). I also want to assign the "text" value of each to be some unrelated string (e.g "dog","cat","ant"). </p>

<p>I would like to use this syntax:</p>

<pre><code>&lt;asp:DropDownList ID="myCombo" runat="server"&gt;
  &lt;asp:ListItem Text="cat" Value="&lt;%= myEnumType.A.toString() %&gt;" /&gt;
  &lt;asp:ListItem Text="dog" Value="&lt;%= myEnumType.B.toString() %&gt;" /&gt;
  &lt;asp:ListItem Text="ant" Value="&lt;%= myEnumType.C.toString() %&gt;" /&gt;
&lt;/asp:DropDownList&gt;
</code></pre>

<p>But using the &lt;%= is not valid in this type of controls.</p>

<p>How can I do this in declarative ASP.NET (not with code behind to create each item)</p>
