Selected value of dropdownlist in repeater control - with predefined items
<p>I have a DropDownList inside a repeater control in an ASP.NET page that has predefined items. How would I go about setting the selected value of it after binding the data to the repeater control?</p>

<p>For example, I have this code:</p>

<pre><code>&lt;asp:DropDownList ID="cboType" runat="server"&gt;
    &lt;asp:ListItem Text="Communication" Value="Communcation" /&gt;
    &lt;asp:ListItem Text="Interpersonal" Value="Interpersonal" /&gt;
&lt;/asp:DropDownList&gt;
</code></pre>

<p>Because the DropDownList control doesn't have a SelectedValue front-end property, I can't set it on the control level. Instead you have to use the selected property of the <em>list item</em>. What would be ideal is:</p>

<pre><code>&lt;asp:DropDownList ID="cboType" runat="server" SelectedValue='&lt;%# Eval("Type_Of_Behavior") %&gt;'&gt;
    &lt;asp:ListItem Text="Communication" Value="Communcation" /&gt;
    &lt;asp:ListItem Text="Interpersonal" Value="Interpersonal" /&gt;
&lt;/asp:DropDownList&gt;
</code></pre>

<p>Unfortunately that won't work, any ideas?</p>
