ASP.NET AutoCompleteType eigenschap
Definitie en gebruik
De AutoCompleteType-eigenschap wordt gebruikt om het soort AutoComplete van de TextBox-knop in te stellen of terug te geven.
Om de invoer van gegevens van de gebruiker te ondersteunen, ondersteunen Microsoft Internet Explorer 5 en hogere versies en Netscape een functie genaamd automatisch invullen.
De AutoComplete kenmerk kan een lijst van eerder ingevoerde waarden in een tekstvak aanmaken. Wanneer het tekstvak opnieuw wordt gebruikt, wordt de lijst van eerder ingevoerde waarden weergegeven. De gebruiker kan de waarden direct kiezen zonder de eerder ingevoerde waarden opnieuw in te moeten voeren.
Gebruik de AutoCompleteType-eigenschap om het gedrag van de automatisch invullenfunctionaliteit van de TextBox-knop te controleren. De System.Web.UI.WebControls.AutoCompleteType enumeratie wordt gebruikt om de waarden te vertegenwoordigen die op de AutoCompleteType-eigenschap kunnen worden toegepast.
Syntax
<asp:TextBox AutoCompleteType="cat" runat="server"/>
Eigenschap | Beschrijving |
---|---|
cat |
Stelt het soort automatisch invullen in. De standaardwaarde is None. Mogelijke waarden:System.Web.UI.WebControls.AutoCompleteType enumeratiewaardenEén van hen. |
Voorbeeld
Het volgende voorbeeld stelt de AutoCompleteType-modus in op "HomePhone":
<form runat="server"> <asp:TextBox id="tb1" runat="server" AutoCompleteType="HomePhone" /> </form>
Voorbeeld
- Stel de AutoCompleteType-eigenschap van de TextBox-knop in
AutoCompleteType enumeratie
Lidnaam | Verklaring |
---|---|
BusinessCity | Het bedrijfsadres behoort tot de stedelijke categorie van het bedrijfsadres. |
BusinessCountryRegion | Het bedrijfsadres behoort tot de land/regioncategorie van het bedrijfsadres. |
BusinessFax | Het faxnummer van het bedrijfsadres behoort tot de faxnummercategorie van het bedrijfsadres. |
BusinessPhone | Category for the phone number of the business address. |
BusinessState | Category for the state of the business address. |
BusinessStreetAddress | Category for the street address of the business address. |
BusinessUrl | Category for the URL of the business website. |
BusinessZipCode | Category for the postal code of the business address. |
Cellular | Category for the mobile phone number. |
Company | Category for the name of the enterprise. |
Department | Category for the department within the enterprise. |
Disabled | Disable the auto-complete feature for the TextBox control. |
DisplayName | Category for the name displayed for the user. |
Category for the user's email address. | |
FirstName | Category for the user's name. |
Gender | Category for the user's gender. |
HomeCity | Category for the city of the home address. |
HomeCountryRegion | Category for the country/region of the home address. |
HomeFax | Category for the fax number of the home address. |
Homepage | Category for the URL of the website. |
HomePhone | Category for the phone number of the home address. |
HomeState | Category for the state of the home address. |
HomeStreetAddress | Category for the street address of the home address. |
HomeZipCode | Category for the postal code of the home address. |
JobTitle | Category for the user's job title. |
LastName | Category for the user's surname. |
MiddleName | Category for the user's middle name. |
None | No category is associated with the TextBox control. All TextBox controls with the same ID share the same value list. |
Notes | Any additional information to be included in the form category. |
Office | Category for the location of the business office. |
Pager | Category for paging numbers. |
Search | Keyword categories for searching web pages or websites. |