Dynamically populating a dropdownlist based on selected value in another dropdown list
<p>I have two dropdown lists, where one is populated on page load and the other should only be populated when a value is selected in the first one.  The first dropdown list is defined as:</p>

<pre><code>&lt;asp:DropDownList ID = "base_ddl" runat="server" ToolTip="Base" OnSelectedIndexChanged = "BaseSelected"&gt;
//  snip...
&lt;/asp:DropDownList&gt;
</code></pre>

<p>Then, the second dropdown list (<code>secondary_ddl</code>) is populated in the <code>OnSelectedIndexChanged</code> method, <code>BaseSelected</code>.</p>

<pre><code>    public void BaseSelected(object sender, EventArgs e)
    {
        if (base_ddl.SelectedValue == "-1")
        {
            secondary_ddl.Visible = false;
        }
        else 
        {
            secondary_ddl.Items.Clear();

            // extract information to populate dropdown here
            // snip.
            IList&lt;InfoContainer&gt; info = getInfoBasedOnSelected(base_ddl.Value);

            foreach (InfoContainer i in info)
            {
                secondary_ddl.Items.Add(new ListItem(i.name, i.value));
            }
        }
    }
</code></pre>

<p>This doesn't work, which leads to this question: why?  How can I dynamically update that dropdown from the <code>OnSelectedIndexChanged</code> function for the other dropdown?</p>
