protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { DropDownList2.Items.Clear(); Doctor_GetDoctorByDepartmentBL objDoctor_GetDoctorByDepartmentBL = new Doctor_GetDoctorByDepartmentBL(); DropDownList2.DataSource = objDoctor_GetDoctorByDepartmentBL.Doctor_GetDoctorByDepartment(Convert.ToInt32(DropDownList1.SelectedValue), Convert.ToInt32(Session["doctorId"].ToString())); DropDownList2.DataValueField = "ID"; DropDownList2.DataTextField = "DOCTOR_NAME"; DropDownList2.Items.Add(new ListItem("--Select--", "0")); DropDownList2.DataBind(); }