title: Dynamic Dropdownlist value not showing using server tags
body: <p>I'm currently using this code to try to populate my dropdown list in asp. </p>
  
  <pre><code>for (int i = 0; i &lt; items.Count; i++)
  {
      models.Add(i+1, items.ElementAt(i).model);
  }
  ddl_Model.DataTextField = "Value";
  ddl_Model.DataValueField = "Key";
  ddl_Model.DataSource = models;
  ddl_Model.DataBind();             
  </code></pre>
  
  <p>However, upon using SelectedItem or SelectedValue, it always show as though my list is empty.</p>
  
  <p>I believe it's due to me declaring an empty list from the start, before populating it.</p>
  
  <pre><code>&lt;h2&gt;Please Select your Model:&lt;/h2&gt;
  &lt;asp:DropDownList ID="ddl_Model" AppendDataBoundItems="True"  runat="server" &gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>May I know how to get the correct values from my drop down list? </p>
  
  <p>Thanks in advance.</p>