Dropdownlist Selected value is not working
<p>I have 2 dropdowns ddl1 and ddl2. When im setting selected value for ddl1 it works,but after setting selected value for ddl2 also changes the value of ddl1.I dont know how but its doing so.</p>

<h2>aspx</h2>

<pre><code> &lt;asp:DropDownList ID="ddlPickup" runat="server" CssClass="tb_date" 

                       &gt;                            
                    &lt;/asp:DropDownList&gt;
                    &amp;nbsp;&amp;nbsp;&amp;nbsp; Dropoff:
                    &lt;asp:DropDownList ID="ddlDropoff" runat="server" CssClass="tb_date" &gt;
                    &lt;/asp:DropDownList&gt;    
&lt;asp:RadioButtonList ID="radiobuttonlist1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="radiobuttonlist1_SelectedIndexChanged"
                        RepeatDirection="Horizontal"&gt;
                        &lt;asp:ListItem Value="1"&gt;Day or Longer&lt;/asp:ListItem&gt;
                        &lt;asp:ListItem Value="2"&gt;1/2 Day&lt;/asp:ListItem&gt;
                        &lt;asp:ListItem Value="3"&gt;Hourly&lt;/asp:ListItem&gt;
                    &lt;/asp:RadioButtonList&gt;
</code></pre>

<h2>code behind</h2>

<pre><code>protected void radiobuttonlist1_selectedindexchange(object sender, EventArgs e)
{
if(radiobuttonlist1.SelectedValue=="1")
{
     Setddl();
}
}
public void Setddl()
{
if (ddlPickup.Items.Count &gt; 0)
            {
                ddlPickup.Items.Clear();
            }
            if (ddlDropoff.Items.Count &gt; 0)
            {
                ddlDropoff.Items.Clear();
            }
            ListItem li = new ListItem();
            DateTime date = Convert.ToDateTime(StartDate.Text);
            int day = Convert.ToInt32(date.DayOfWeek);
            long itemid = Convert.ToInt64(ddlRentalItem.SelectedValue);
            if (itemid != 0)
            {
                var dropoff = _objRitems.GetHourlyHourByDay(itemid, day);
                if (dropoff.Count &gt; 0)
                {



                    int stimeh = Convert.ToDateTime(dropoff[0].OpenTime).Hour;
                    int etimeh = Convert.ToDateTime(dropoff[0].CloseTime).Hour;
                    DateTime dt = Convert.ToDateTime(dropoff[0].OpenTime);
                    for (int i = 0; i &lt;= (etimeh - stimeh) * 2; i++)
                    {
                        string time = string.Format("{0:t}", dt);
                        li = new ListItem(time, time);
                        ddlPickup.Items.Add(li);
                        ddlDropoff.Items.Add(li);
                        dt = dt.AddMinutes(30);
                    }
                    ddlPickup.DataBind();
                    ddlDropoff.DataBind();
ddlPickup.SelectedValue=Request.QueryString["droptime"].ToString();
ddlDropoff.SelectedValue=Request.QueryString["droptime"].ToString();
//as soon as ddlDropoff SelectedValue assigns ddlPickup.SelectedValue changes to ddlDropoff.SelectedValue..Very Weird!!!
                }
                else
                {

                }
            }
            else
            {

            }
}
</code></pre>
