1

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.

mohsinali1317
  • 4,255
  • 9
  • 46
  • 85
  • check this:http://www.google.com.pk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CBsQFjAA&url=http%3A%2F%2Fdevelopmentpassion.blogspot.com%2F2013%2F12%2Ffacebook-and-linkedin-like-searching.html&ei=KiuQVI7zO9bVaqaZgIgE&usg=AFQjCNFX88V1JeHG__FVOkyea12ek8rgjA&bvm=bv.81828268,d.d2s – Ehsan Sajjad Dec 16 '14 at 12:53

0 Answers0