dependence between radiobutton and dropdownlist
<p>I have this code</p>

<pre><code>protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
{
    if (RadioButton1.Checked)
    {
        RadioButton2.Checked = false;
        DropDownList1.Enabled = true;
    }
    if (!RadioButton1.Checked)
    {
        RadioButton2.Checked = true;
    }

}
protected void RadioButton2_CheckedChanged(object sender, EventArgs e)
{
    if (RadioButton2.Checked)
    {
        RadioButton1.Checked = false;
        DropDownList1.Enabled = false;
    }
    if (!RadioButton1.Checked)
    {
        RadioButton1.Checked = true;
    }
}
&lt;asp:DropDownList   ID="DropDownList1"  runat="server" DataSourceID="BookStore" DataTextField="Name" DataValueField="Name"  Height="51px" Width="300px" DataMember="DefaultView"&gt;

&lt;/asp:DropDownList&gt;
&lt;asp:SqlDataSource ID="BookStore" runat="server" ConnectionString="&lt;%$ ConnectionStrings:BookStoreConnectionString %&gt;" SelectCommand="SELECT [Name] FROM [Books] ORDER BY [Name]"&gt;&lt;/asp:SqlDataSource&gt;
&lt;p&gt;
    &lt;asp:RadioButton ID="RadioButton1" runat="server" Checked="True" GroupName="1" OnCheckedChanged="RadioButton1_CheckedChanged" /&gt;
    &lt;asp:RadioButton ID="RadioButton2" runat="server" GroupName="1" OnCheckedChanged="RadioButton2_CheckedChanged" /&gt;

&lt;/p&gt;
</code></pre>

<p>But when I click radiobuttons, dropdownlist is alwais enabled. When I write this functions in webforms app(not asp.net) its working correct.What could be the reason of this uncorrect working?</p>