我想问一下,如何比较2下拉列表值,以便它们不能相同。 <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem Text="Kuala Lumpur International Airport" Value="KUL"></asp:ListItem> <asp:ListItem Text="Kota Kinabalu International Airport" Value="BKI"></asp:ListItem> <asp:ListItem Text="Penang International Airport" Value="PEN"></asp:ListItem> </asp:DropDownList>
验证2下拉列表
`<asp:DropDownList ID="DropDownList2" runat="server">
<asp:ListItem Text="Kuala Lumpur International Airport" Value="KUL"></asp:ListItem>
<asp:ListItem Text="Kota Kinabalu International Airport" Value="BKI"></asp:ListItem>
<asp:ListItem Text="Penang International Airport" Value="PEN"></asp:ListItem> </asp:DropDownList>`
我怎么做,这样,2个值将是不一样的。就像用户在DropDownList1中选择吉隆坡国际机场一样,他们无法在DropDownList2中选择吉隆坡国际机场。 感谢大家的帮助。 :)
,获得该项目,并从dropdownlist2禁用该项目。 –
嗨。 Sowjanya。感谢您的回复。有可能的?如果可能的话,我该怎么做? –
请参阅http://www.c-sharpcorner.com/forums/how-do-disable-a-combobox-item-in-win-form-using-c-sharp。它可能会帮助你。 –