title: How to clear exisiting dropdownlist items when its content changes?
body: <p>ddl2 populates based on ddl1 selected value successfully.</p>
  
  <p>My issue is the data that is already present in ddl2 does not clear before appending the new data so ddl2 content just continues to grow every time ddl1 is changed. </p>
  
  <pre><code>&lt;asp:DropDownList ID="ddl1" RunAt="Server" DataSourceID="sql1" DataValueField="ID1" DataTextField="Name2" AppendDataBoundItems="True" AutoPostBack="True"&gt;
    &lt;asp:ListItem Text="ALL" Selected="True" Value="0"/&gt;
  &lt;/asp:DropDownList&gt;
  
  &lt;asp:DropDownList ID="ddl2" RunAt="Server" DataSourceID="sql2" DataValueField="ID2" DataTextField="Name2" AppendDataBoundItems="True" AutoPostBack="True"&gt;
    &lt;asp:ListItem Text="ALL" Selected="True" Value="0"/&gt;
  &lt;/asp:DropDownList&gt;
  
  &lt;asp:SqlDataSource ID="sql1" RunAt="Server" SelectCommand="sp1" SelectCommandType="StoredProcedure"/&gt;
  
  &lt;asp:SqlDataSource ID="sql2" RunAt="Server" SelectCommand="sp2" SelectCommandType="StoredProcedure"&gt;
    &lt;SelectParameters&gt;
      &lt;asp:ControlParameter Type="Int32" Name="ID1" ControlID="ddl1" PropertyName="SelectedValue"/&gt;
    &lt;/SelectParameters&gt;
  &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>I have tried re-databinding in code behind on selected index change and also items.clear with little success.</p>
  
  <pre><code>Protected Sub ddl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
      ddl2.Items.Clear()
      ddl2.DataSource = sql2
      ddl2.DataBind()
  End Sub
  </code></pre>
  
  <p><strong>QUESTION</strong></p>
  
  <p>How to get items present in an asp:dropdownlist to clear before new values are populated when the dropdownlists content is dependent on another dropdownlists selected value?</p>
  
  <p><em>Please post any code in VB</em></p>