Add dropdownlist value to database which items add from page load functions
<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    //skipped
    foreach(pair item in al)  
    {           
        pid.Items.Add(new ListItem(item.getTitle(), item.getId()));

    }  

}

protected void Button1_Click(object sender, EventArgs e) 
{
            insertUser.Parameters.AddWithValue("@parent_id", Convert.ToInt32(pid.SelectedValue));

}
</code></pre>

<p>From the above code there is a dropdownlist that all items are added from Page_Load function, and the bug is that, whatever items i choose from dropdownlist, only the first item is added to database.</p>

<p>anyone know what's the problem?</p>

<p>thanks!</p>
