Author: Hejime | Posted on: 5/5/2009 10:30:48 PM | Views : 259

hi there.. i seem to have a problem with two different drop down list which works almost the same way
 <asp:DropDownList ID="ddl_meal" runat="server" onclick="SetFlag('1');" AutoPostBack="true" OnSelectedIndexChanged="ddl_meal_SelectedIndexChanged"></asp:DropDownList>
 and
<asp:DropDownList ID="ddl_tea_break" runat="server" onclick="SetFlag('1');" AutoPostBack="true" OnSelectedIndexChanged="ddl_tea_break_SelectedIndexChanged">
</asp:DropDownList>
 i seem to get this crashing message which i don't understand what is wrong
System.Web.HttpException: Cannot have multiple items selected in a DropDownList.
the only time when the drop down lists are asked to select an item is
ddl_meal.SelectedIndex = ddl_meal.Items.IndexOf(ddl_meal.Items.FindByValue(iMealId))
ddl_tea_break.SelectedI ...

Go to the complete details ...