Autocomplete needs a controller or url to get data from, by default convention it will look for a controller with the same name as it + "Autocomplete"

  • action GetItems - gets the items for the autocomplete, it will receive a v parameter which represents the value of the textbox
Meal:@Html.Awe().AutocompleteFor(o => o.Meal).Placeholder("try Ma")
public class MealAutocompleteController : Controller
public ActionResult GetItems(string v)// v is the entered text
v = (v ?? "").ToLower().Trim();

var items = Db.Meals.Where(o => o.Name.ToLower().Contains(v));

return Json(items.Take(10).Select(o => new KeyContent(o.Id, o.Name)));

Storing selected value key in a separate field using .PropId

Parent Category: you can (should) use hidden input instead

when the user selects a value from the autocomplete lists the PropId will be assigned the key of the selected value, but if the user will type something into the autocomlete after that the propId value will clear
Parent Category:
@(Html.Awe().AutocompleteFor(o => o.ParentCategory)
.Placeholder("try Le Fr")
.PropId(o => o.ParentCategoryId)

@Html.TextBoxFor(o => o.ParentCategoryId) you can (should) use hidden input instead

Bound to parents

Parent Categories (MultiLookup):
and Parent Category:
Child Meal:

Numeric autocomplete

Prime number:

Using predefined parameters

Meal1 (parent = Fruits):
Meal2 (parent = Fruits, Legumes, Vegetables):