public static List <string> SearchItemGroup(string prefixText, int count) { DataSet ds = new DataSet(); SqlInvoice cn = new SqlInvoice(); List <string> zone = new List <string>(); string cnm = ""; ds = cn.RunSql("sp_Searchforautocomplete 'I','" + prefixText + "','" + HttpContext.Current.Request.Cookies["CompID"].Value + "'", "select"); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { cnm = AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(ds.Tables[0].Rows[i]["cItemGroupName"].ToString(), ds.Tables[0].Rows[i]["nid"].ToString()); zone.Add(cnm); } } return(zone); }