public JsonResult ShowDoctorForSlot() { Models.Staffs slotDoc = new Staffs(); DataSet ds = slotDoc.GetDoctorForSlot(); List <SelectListItem> docList = new List <SelectListItem>(); foreach (DataRow dr in ds.Tables[0].Rows) { docList.Add(new SelectListItem { Text = dr["STAFF_ID"].ToString() + " : Dr. " + dr["STAFF_NAME"].ToString() + " : " + dr["STAFF_QUALIFICATION"].ToString(), Value = dr["STAFF_ID"].ToString() }); } return(Json(docList, JsonRequestBehavior.AllowGet)); }