Autocomplete Guidance

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

As a user enters information in a text box on a Web page, a Web page can use AutoComplete behavior to display a list of suggested values, and a user can choose from this list instead of typing the complete term. Figure 1 illustrates the MSDN search text box displaying a list of suggested search terms that begin with the characters typed by the user.

Ff709912.9ed1f271-bf2b-4e46-9181-b035ea790e2a(en-us,PandP.10).png

Figure 9

Using AutoComplete behavior to suggest search terms

Browsers, such as Microsoft Internet Explorer, can keep track of information that you have recently typed, such as Web site addresses, information in forms, and search queries, and then include these values in the list of suggestions. In this case, the Web application requires no changes because the browser provides the AutoComplete behavior; the list of suggested values is limited to values previously entered, and this list is maintained on the client computer.

In many scenarios, the list of suggestions is best produced by logic that runs on the server. Consider the example illustrated in Figure 1. The list of suggested terms could be the list of all search terms indexed on the server, or it could be a smaller list of only the frequently searched terms. In each case, the server contains the logic that produces the list of suggestions.

Typically, the logic on the server uses pattern matching to select terms that include characters entered by the user in the search box. This means the list of suggestions begins with the same set of characters as the terms entered by the user into the search box. Any data that the user has entered into other input controls on the search form does not influence the list of suggestions.

The purpose of the AutoComplete guidance is to provide information on how to incorporate data that users enter into different controls on the Web page other than the Search Box control into the server’s list of suggestions.

What Is in This Guidance?

The AutoComplete Guidance contains the following elements:

  • AutoComplete Behavior. This topic explains how the Web Client Software Factory allows you to implement autocomplete behavior and augment it with the ContextSensitiveAutocompleteExtender.
  • ContextSensitiveAutoCompleteExtender Control. This topic explains how to use the ContextSensitiveAutoCompleteExtender control to filter the list of suggested values.
  • AutoComplete QuickStart. This topic demonstrates how to use the ContextSensitiveAutocompleteExtender control to filter a list of suggested values.
  • Patterns related to AutoComplete. This topic explains various patterns that are used by the ContextSensitiveAutocompleteExtender control.
Show: