In my controller I was populating a select list like this
public IEnumerable<SelectListItem> getResponsibleInstitutions(String id)
{
Kitchen k = Kitchen.Get(id);
return k.GetInstitutions().Select(c => new SelectListItem
{
Value = c.Id,
Text = c.Name
});
}
Then using Viewbag I was populating a dropdown menu like this
@Html.DropDownList("ingredients", (IEnumerable<SelectListItem>)ViewBag.ingredients, "--Select Ingredients--")
But I want a text box instead of the select list which would have auto complete on it. What is the best approach to do it? Thanks for the help.