I have two drop down lists. I need a selection made in the second one if there is a selection in the first one.
if((ddl1.SelectedIndex > -1 ) != (ddl2.SelectedIndex > -1))
{
this.lblError.Visible = true;
}
So basically if the there is a selection in the first one but not the second one then error.
Would it be the drop down it's self??
<asp:DropDownList ID="ddlRate1" runat="server">
<asp:ListItem Value="">(Select)</asp:ListItem>
<asp:ListItem>Initial</asp:ListItem>
<asp:ListItem>Moderate</asp:ListItem>
</asp:DropDownList>