public static string[] GetPartyNo(string prefixText) { string constr = ApplicationFunction.ConnectionString(); List <string> PartyNumber = new List <string>(); DataTable dtNames = new DataTable(); AccountBookDAL obj = new AccountBookDAL(); DataSet dt = obj.SelectPartyList(prefixText, ApplicationFunction.ConnectionString()); if (dt != null && dt.Tables.Count > 0 && dt.Tables[0].Rows.Count > 0) { for (int i = 0; i < dt.Tables[0].Rows.Count; i++) { string item = AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(Convert.ToString(dt.Tables[0].Rows[i]["Acnt_Name"]), Convert.ToString(dt.Tables[0].Rows[i]["Acnt_Idno"])); PartyNumber.Add(item); } return(PartyNumber.ToArray()); } else { return(null); } }