If you want to enable and disable you can use this Code
<asp:DropDownList ID="ddl1" runat="server" AppendDataBoundItems="true" AutoPostBack="true" Width="100%">
<asp:ListItem Text="" ></asp:ListItem>
<asp:ListItem Text="Value 1" Value="1"></asp:ListItem>
<asp:ListItem Text="Value 2" Value="2"></asp:ListItem>
</asp:DropDownList>
You need to set AutoPostBack="true" and in the SelectedIndexChanged write this code
protected void ddl1_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
if (ddl1.SelectedValue == "1")
{
ddl2.Enabled = false;
//ddl2.Visible = false;
}
else
{
ddl2.Enabled = true;
//ddl2.Visible = true;
}
}
catch (Exception ex)
{
string b= ex.Message;
}
}
For VISIBLE *enabling/disabling* USE the commented line and comment the other line
Hope this helps
Happy coding