ASP.NET AutoCompleteType property
Definition and usage
The AutoCompleteType property is used to set or return the type of AutoComplete for the TextBox control.
To assist users in data entry, Microsoft Internet Explorer 5 and later versions and Netscape support a feature called auto-complete.
The AutoComplete feature can create a list of values entered in the text box. When the text box is used again, the list of entered values or displayed. Users can directly select values without needing to re-enter previously entered values.
Use the AutoCompleteType property to control the behavior of the auto-complete feature of the TextBox control. The System.Web.UI.WebControls.AutoCompleteType enumeration is used to represent the values that can be applied to the AutoCompleteType property.
Syntax
<asp:TextBox AutoCompleteType="cat" runat="server"/>
Property | Description |
---|---|
cat |
Specify the type of auto-completion. The default value is None. Possible values:System.Web.UI.WebControls.AutoCompleteType enumeration valuesOne of them. |
Instance
The following example sets the AutoCompleteType mode to "HomePhone":
<form runat="server"> <asp:TextBox id="tb1" runat="server" AutoCompleteType="HomePhone" /> </form>
Instance
- Set the AutoCompleteType property of the TextBox control
AutoCompleteType enumeration
Member name | Description |
---|---|
BusinessCity | Office address city category. |
BusinessCountryRegion | Office address country/region category. |
BusinessFax | Office address fax number category. |
BusinessPhone | Liiketoiminnan osoitteen puhelinnumero luokka. |
BusinessState | Liiketoiminnan osoitteen osavaltion luokka. |
BusinessStreetAddress | Liiketoiminnan osoitteen kadun luokka. |
BusinessUrl | Liiketoiminnan verkkosivuston URL-osoite luokka. |
BusinessZipCode | Liiketoiminnan osoitteen postinumero luokka. |
Cellular | Matkapuhelinnumero luokka. |
Company | Yrityksen nimi luokka. |
Department | Yrityksen osaston luokka. |
Disabled | TextBox -valitsimen automaattisen täydennyksen poistaminen käytöstä. |
DisplayName | Näytettävä nimi luokka. |
Käyttäjän sähköpostiosoite luokka. | |
FirstName | Käyttäjänimen luokka. |
Gender | Käyttäjän sukupuolen luokka. |
HomeCity | Kotiosoitteen kaupunki luokka. |
HomeCountryRegion | Kotiosoitteen maa/alue luokka. |
HomeFax | Kotiosoitteen faksinumero luokka. |
Homepage | Verkkosivuston URL-osoite luokka. |
HomePhone | Kotiosoitteen puhelinnumero luokka. |
HomeState | Kotiosoitteen osavaltion luokka. |
HomeStreetAddress | Kotiosoitteen kadun luokka. |
HomeZipCode | Kotiosoitteen postinumero luokka. |
JobTitle | Käyttäjän tehtävänimikkeen luokka. |
LastName | Käyttäjän sukunimen luokka. |
MiddleName | Käyttäjän keskimmäisen nimen luokka. |
Ei mitään | Käyttöehdot: Ei mitään luokkaa liittyy TextBox -valitsimeen. Kaikki samalla ID:llä olevat TextBox -valitsimet jakavat saman arvostaulukon. |
Huomiot | Lisätietoja, jotka halutaan sisällyttää lomakkeen luokkaan. |
Toimisto | Liiketoiminnan toimipaikan luokka. |
Sivutus | Pikaviestinnumerojen luokka. |
Haku | Avainsanat, joita käytetään hakutoiminnossa sivustoilla tai verkkosivustoilla. |