System.Web.UI.WebControls.AutoCompleteType Enumeration

Represents the values that control the behavior of the AutoComplete feature in a System.Web.UI.WebControls.TextBox control.

Syntax

public enum AutoCompleteType

Remarks

To assist with data entry, Internet Explorer 5 and later and some other browsers support a feature named AutoComplete. AutoComplete monitors a text box and stores a list of the values that the user has entered. When the user returns to the text box another time, the list of values is displayed. Instead of retyping a value, the user can simply select the value from this list.

Note:

Not all browsers support the AutoComplete feature. Check with your browser to determine compatibility.

To control the behavior of the AutoComplete feature for a System.Web.UI.WebControls.TextBox control, you use the TextBox.AutoCompleteType property. The System.Web.UI.WebControls.AutoCompleteType enumeration is used to represent the values that you can apply to the TextBox.AutoCompleteType property.

By default, the TextBox.AutoCompleteType property for a System.Web.UI.WebControls.TextBox control is set to AutoCompleteType.None. With this setting, the System.Web.UI.WebControls.TextBox control shares the list with other System.Web.UI.WebControls.TextBox controls with the same System.Web.UI.Control.ID across different pages. You can also share a list among System.Web.UI.WebControls.TextBox controls based on a category instead of based on an System.Web.UI.Control.ID. When you set the System.Web.UI.WebControls.AutoCompleteType property to one of the category values (such as AutoCompleteType.FirstName or AutoCompleteType.LastName), all System.Web.UI.WebControls.TextBox controls with the same category share the same list. You can disable the AutoComplete feature for a System.Web.UI.WebControls.TextBox control by setting the System.Web.UI.WebControls.AutoCompleteType property to AutoCompleteType.Disabled.

Refer to your browser documentation for details on configuring and enabling the AutoComplete feature. For example, to enable the AutoComplete feature in Internet Explorer version 5 or later, from the Tools menu, choose Internet Options. Then choose the Content tab. Choose the AutoComplete button to view and modify options for the AutoComplete feature.

For more information on the AutoComplete feature in Internet Explorer, search for tp://msdn.microsoft.com/library/default.asp?url=/workshop/author/forms/autocomplete_ovr.asp in the MSDN Library at http://msdn.microsoft.com/library.

Members

Member NameDescription
BusinessCity

The city for a business address category.

BusinessCountryRegion

The country/region for a business address category.

BusinessFax

The fax number for a business address category.

BusinessPhone

The phone number for a business address category.

BusinessState

The state for a business address category.

BusinessStreetAddress

The street for a business address category.

BusinessUrl

The URL to a business Web site category.

BusinessZipCode

The ZIP code for a business address category.

Cellular

The phone number for a mobile-phone category.

Company

The name of a business category.

Department

A department within a business category.

Disabled

The AutoComplete feature is disabled for the System.Web.UI.WebControls.TextBox control.

DisplayName

The name to display for the user category.

Email

The user's e-mail address category.

FirstName

The first name category.

Gender

The gender of the user category.

HomeCity

The city for a home address category.

HomeCountryRegion

The country/region for a home address category.

HomeFax

The fax number for a home address category.

Homepage

The URL to a Web site category.

HomePhone

The phone number for a home address category.

HomeState

The state for a home address category.

HomeStreetAddress

The street for a home address category.

HomeZipCode

The ZIP code for a home address category.

JobTitle

The user's job title category.

LastName

The last name category.

MiddleName

The user's middle name category.

None

No category is associated with the System.Web.UI.WebControls.TextBox control. All System.Web.UI.WebControls.TextBox controls with the same System.Web.UI.Control.ID share the same value list.

Notes

Any supplemental information to include in the form category.

Office

The location of the business office category.

Pager

The phone number for a pager category.

Search

The keyword or keywords with which to search a Web page or Web site category.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0