Chapter 27. Recipe: creating an autocomplete text box

This chapter covers

  • Creating an autocomplete text box in ASP.NET MVC
  • Using a jQuery autocomplete plug-in

It’s not uncommon for text boxes to automatically suggest items based on what we type. The results are further filtered as we type to give us the option to select an available item with the mouse or keyboard. One of the first examples of this in the wild was Google Suggest, shown in figure 27.1.

Figure 27.1. Google Suggest filters options as we type.

This chapter covers the mechanics of implementing autocomplete functionality using the freely available jQuery library. We’ll first ...

Get ASP.NET MVC 2 in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.