public static string[] GetCompletionListIpAddress(string prefixText, int count, string contextKey) { Att_DeviceMaster objDevice = new Att_DeviceMaster(); DataTable dt = new DataView(objDevice.GetDeviceMaster(HttpContext.Current.Session["CompId"].ToString()), "IP_Address like '" + prefixText.ToString() + "%'", "", DataViewRowState.CurrentRows).ToTable(); string[] txt = new string[dt.Rows.Count]; for (int i = 0; i < dt.Rows.Count; i++) { txt[i] = dt.Rows[i]["IP_Address"].ToString(); } return(txt); }