i have 3 dropdownlist when i select first dropdown fill 2nd and 3rd when i select 3rd dropdown any value it's automatic select index 1 both dropdown 2nd and 3rd. i want do some work on 3rd dropdown selected index change. here is my aspx code
body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem Selected="True">select</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="DropDownList2" runat="server">
</asp:DropDownList>
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList3_SelectedIndexChanged">
</asp:DropDownList>
</div>
</form>
and my cs code is
HotelBAL objhotel = new HotelBAL();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//objhotel.searchHotelRoomType(DropDownList1, "1");
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string id = DropDownList1.SelectedItem.Text;
objhotel.searchHotelOccupancy(DropDownList2, id);
objhotel.searchHotelMealPlan(DropDownList3, id);
}
protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
{
}