public JsonResult GetProperties(string request) { List <string> results = new List <string>(); foreach (string pro in NhaXuatBan.searchKeys()) { results.Add(request + pro); } return(Json(results, JsonRequestBehavior.AllowGet)); }
private void txbLoc_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 123) { txbLoc.Text = txbLoc.Text + "{"; string request = txbLoc.Text; var pros = NhaXuatBan.searchKeys(); AutoCompleteStringCollection source = new AutoCompleteStringCollection(); foreach (var info in pros) { source.Add(request + info); } txbLoc.AutoCompleteCustomSource = source; } }