public static string[] GetDoctorNames(string prefixText, int count, string contextKey) { PatientInfoDAL objPat_Info = new PatientInfoDAL(); List<string> Doc_List = new List<string>(); objPat_Info = new PatientInfoDAL(); Doc_List.Clear(); DataTable Doc_Names = objPat_Info.get_AllDoctors(prefixText); if (Doc_Names.Rows.Count > 0) { foreach (DataRow dr in Doc_Names.Rows) { Doc_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString().Trim() + "," + dr[0].ToString().Trim(), dr[2].ToString())); } } else { Doc_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Doctor Found...", "0")); } return Doc_List.ToArray(); }