title: Populating DropDownList inside Repeater not working
body: <p>I'm trying to populate a dropdown list inside a repeater, but I'm not being very successful.
  I'm probably using the wrong <strong>EventArgs e</strong>.</p>
  
  <p>Here's my aspx code:</p>
  
  <pre><code>        &lt;asp:Repeater runat="server" id="criteriaScore"&gt;
              &lt;HeaderTemplate&gt;
                &lt;ul&gt;         
                  &lt;li class="header"&gt;&lt;span class="item"&gt;Kriterie&lt;/span&gt;&lt;span class="value"&gt;Poeng&lt;/span&gt;&lt;span class="description"&gt;Beskrivelse&lt;/span&gt;&lt;/li&gt;
              &lt;/HeaderTemplate&gt;
              &lt;ItemTemplate&gt;
                  &lt;li&gt;
                      &lt;span class="item"&gt; &lt;%# Eval("criteria") %&gt;:&lt;/span&gt;
                      &lt;asp:DropDownList id="ddlRating" runat="server" autopostback="true" enableviewstate="false"&gt;&lt;/asp:DropDownList&gt;
                      &lt;span class="value score&lt;%# Eval("lvl") %&gt;" title="&lt;%# Eval("description") %&gt;"&gt; &lt;/span&gt;
                  &lt;/li&gt;
              &lt;/ItemTemplate&gt;
              &lt;FooterTemplate&gt;
                  &lt;/ul&gt;  
              &lt;/FooterTemplate&gt;
          &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>And the code behind:</p>
  
  <pre><code>    protected void criteriaScore_ItemDataBound(object sender, DataListCommandEventArgs e)
      {
          DropDownList ddl = (DropDownList)e.Item.FindControl("ddlRating");
  
          for(int i=1; i &gt; 5; i++)
          {
              ddl.Items.Add(new ListItem(i.ToString(), i.ToString()));
          }
      }
  </code></pre>
  
  <p>Can someone please guide me down the right path? :)</p>