protected void DDLEngineSize1_SelectedIndexChanged(object sender, EventArgs e) { GenericVehicle gv = new GenericVehicle(); DDLFuelType.Items.Clear(); DDLFuelType.Items.Insert(0, ""); foreach (string fuelType in gv.SearchVehicleFuelType(DDLModel.Text, DDLYear.Text, DDLEngineSize1.Text)) { DDLFuelType.Items.Add(gv.FuelTypeCheck(fuelType)); } }
protected void EngineSizeDDL_SelectedIndexChanged(object sender, EventArgs e) { GenericVehicle gv = new GenericVehicle(); //Vehicle FuelType //Need to clear the combobox before adding new items FuelTypeDDL.Items.Clear(); FuelTypeDDL.Items.Insert(0, ""); foreach (string fuelType in gv.SearchVehicleFuelType(ModelDDL.Text, YearDDL.Text, EngineSizeDDL.Text)) { FuelTypeDDL.Items.Add(gv.FuelTypeCheck(fuelType)); } FuelTypeDDL.DataBind(); }