Posted on: 11/8/2013 1:41:45 AM | Views : 523

I have a Dropdownlist1 of select say = A, B, C, D, E
For some reason, I have another Dropdownlist2 of the same choice A, B, C, D, E.
The user has to make selection in both dropdownlist but I want to control they must not select the same choice.
I wish once the user selected a choice in Dropdownlist1 (eg A), then item A in dropdownlist2 disappear from the list.

<asp:DropDownList ID="DropDownList1"  runat="server"  AutoPostBack="true"         onselectedindexchanged="DropDownList1_SelectedIndexChanged">     <asp:ListItem Value="A">A</asp:ListItem>     <asp:ListItem Value="B">B</asp:ListItem> ..... etc
I tried this code and it can hide item in DDL2 onselect that item in DDL1.
 DropDownList2.Items.FindByText(DropDownList1.SelectedItem.ToString ...

Go to the complete details ...