AutoCompleteType 列挙体
アセンブリ: System.Web (system.web.dll 内)

Public Enumeration AutoCompleteType

メンバ名 | 説明 | |
---|---|---|
BusinessCity | 勤務先の住所の都市のカテゴリ。 | |
BusinessCountryRegion | 勤務先の住所の国/地域のカテゴリ。 | |
BusinessFax | 勤務先の住所のファックス番号のカテゴリ。 | |
BusinessPhone | 勤務先の住所の電話番号のカテゴリ。 | |
BusinessState | 勤務先の住所の都道府県のカテゴリ。 | |
BusinessStreetAddress | 勤務先の住所の番地のカテゴリ。 | |
BusinessUrl | 会社の Web サイトの URL のカテゴリ。 | |
BusinessZipCode | 勤務先の住所の郵便番号のカテゴリ。 | |
Cellular | 携帯電話の電話番号のカテゴリ。 | |
Company | 社名のカテゴリ。 | |
Department | 社内の部署のカテゴリ。 | |
Disabled | TextBox コントロールの AutoComplete 機能は無効です。 | |
DisplayName | 表示するユーザー名のカテゴリ。 | |
ユーザーの電子メール アドレスのカテゴリ。 | ||
FirstName | ユーザーの名のカテゴリ。 | |
Gender | ユーザーの性別のカテゴリ。 | |
HomeCity | 自宅の住所の都市のカテゴリ。 | |
HomeCountryRegion | 自宅の住所の国/地域のカテゴリ。 | |
HomeFax | 自宅の住所のファックス番号のカテゴリ。 | |
Homepage | Web サイトの URL のカテゴリ。 | |
HomePhone | 自宅の住所の電話番号のカテゴリ。 | |
HomeState | 自宅の住所の都道府県のカテゴリ。 | |
HomeStreetAddress | 自宅の住所の番地のカテゴリ。 | |
HomeZipCode | 自宅の住所の郵便番号のカテゴリ。 | |
JobTitle | ユーザーの職種のカテゴリ。 | |
LastName | ユーザーの姓のカテゴリ。 | |
MiddleName | ユーザーのミドル ネームのカテゴリ。 | |
None | TextBox コントロールに関連付けられているカテゴリはありません。ID が同じである TextBox コントロールはすべて、同じ値リストを共有します。 | |
Notes | カテゴリのフォームに含める補足情報。 | |
Office | 事業所の所在地のカテゴリ。 | |
Pager | ポケットベルの電話番号のカテゴリ。 | |
Search | Web ページまたは Web サイトのカテゴリを検索するために使用するキーワード。 |

データ エントリを支援するために、Internet Explorer 5 以降および Netscape は AutoComplete と呼ばれる機能をサポートします。AutoComplete 機能はテキスト ボックスを監視し、ユーザーが入力した値のリストを作成します。ユーザーが後でテキスト ボックスに戻ると、このリストが表示されます。ユーザーは前に入力した値を再入力せずに、単にこのリストから値を選択できます。TextBox コントロールの AutoComplete 機能の動作を制御するには、AutoCompleteType プロパティを使用します。AutoCompleteType 列挙体は、AutoCompleteType プロパティに適用できる値を表すために使用されます。
![]() |
---|
既定では、TextBox コントロールの AutoCompleteType プロパティは AutoCompleteType.None に設定されています。この設定では、TextBox コントロールは、同じ ID を使用するその他の TextBox コントロールと、複数のページにまたがってこのリストを共有します。ID の代わりにカテゴリに基づいて、TextBox コントロール間でリストを共有することもできます。AutoCompleteType プロパティをいずれかのカテゴリ値 (AutoCompleteType.FirstName や AutoCompleteType.LastName など) に設定すると、カテゴリが同じである TextBox コントロールのすべてが同じリストを共有します。TextBox コントロールの AutoComplete 機能は、AutoCompleteType プロパティを AutoCompleteType.Disabled に設定して無効にできます。
AutoComplete 機能を設定する方法および有効にする方法の詳細については、お使いのブラウザのマニュアルを参照してください。たとえば、Internet Explorer Version 5 以降で AutoComplete 機能を有効にするには、[ツール] メニューの [インターネット オプション] をクリックします。次に、[コンテンツ] タブをクリックします。[オートコンプリート] ボタンをクリックし、AutoComplete 機能に関するさまざまなブラウザ オプションを表示および変更します。
Internet Explorer の AutoComplete 機能の詳細については、MSDN ライブラリ (http://msdn.microsoft.com/library) で 「Using AutoComplete in HTML Forms」) のトピックを検索してください。

AutoCompleteType 列挙体を使用して、TextBox コントロールの AutoComplete カテゴリを設定する方法の例を次に示します。
<%@ Page Language="VB" %> <html> <body> <form runat="server"> <!-- You need to enable the AutoComplete feature on --> <!-- a browser that supports it (such as Internet --> <!-- Explorer 5.0 and later) for this sample to --> <!-- work. The AutoComplete lists are created after --> <!-- the Submit button is clicked. --> <h3>AutoCompleteType example</h3> Enter values in the text boxes and click the Submit <br/> button. <br/><br/> <!-- The following TextBox controls have different --> <!-- categories assigned to their AutoCompleteType --> <!-- properties. --> First Name:<br/> <asp:textbox id="FirstNameTextBox" autocompletetype="FirstName" runat="server"/> <br/> Last Name:<br/> <asp:textbox id="LastNameTextBox" autocompletetype="LastName" runat="server"/> <br/> Email:<br/> <asp:textbox id="EmailTextBox" autocompletetype="Email" runat="server"/> <br/> <!-- The following TextBox controls have the same --> <!-- categories assigned to their AutoCompleteType --> <!-- properties. They share the same AutoComplete --> <!-- list. --> Phone Line #1:<br/> <asp:textbox id="Phone1TextBox" autocompletetype="HomePhone" runat="server"/> <br/> Phone Line #2:<br/> <asp:textbox id="Phone2TextBox" autocompletetype="HomePhone" runat="server"/> <br/> <!-- The following TextBox control has its --> <!-- AutoCompleteType property set to --> <!-- AutoCompleteType.None. All TextBox controls --> <!-- with the same ID across different pages share --> <!-- the same AutoComplete list. --> Category:<br/> <asp:textbox id="CategoryTextBox" autocompletetype="None" runat="server"/> <br/> <!-- The following TextBox control has the --> <!-- AutoComplete feature disabled. --> Comments:<br/> <asp:textbox id="CommentsTextBox" autocompletetype="Disabled" runat="server"/> <br/> <br/><br/> <asp:button id="SubmitButton" text="Submit" runat="Server"/> </form> </body> </html>
<%@ Page Language="C#" %> <html> <body> <form runat="server"> <!-- You need to enable the AutoComplete feature on --> <!-- a browser that supports it (such as Internet --> <!-- Explorer 5.0 and later) for this sample to --> <!-- work. The AutoComplete lists are created after --> <!-- the Submit button is clicked. --> <h3>AutoCompleteType example</h3> Enter values in the text boxes and click the Submit <br/> button. <br/><br/> <!-- The following TextBox controls have different --> <!-- categories assigned to their AutoCompleteType --> <!-- properties. --> First Name:<br/> <asp:textbox id="FirstNameTextBox" autocompletetype="FirstName" runat="server"/> <br/> Last Name:<br/> <asp:textbox id="LastNameTextBox" autocompletetype="LastName" runat="server"/> <br/> Email:<br/> <asp:textbox id="EmailTextBox" autocompletetype="Email" runat="server"/> <br/> <!-- The following TextBox controls have the same --> <!-- categories assigned to their AutoCompleteType --> <!-- properties. They share the same AutoComplete --> <!-- list. --> Phone Line #1:<br/> <asp:textbox id="Phone1TextBox" autocompletetype="HomePhone" runat="server"/> <br/> Phone Line #2:<br/> <asp:textbox id="Phone2TextBox" autocompletetype="HomePhone" runat="server"/> <br/> <!-- The following TextBox control has its --> <!-- AutoCompleteType property set to --> <!-- AutoCompleteType.None. All TextBox controls --> <!-- with the same ID across different pages share --> <!-- the same AutoComplete list. --> Category:<br/> <asp:textbox id="CategoryTextBox" autocompletetype="None" runat="server"/> <br/> <!-- The following TextBox control has the --> <!-- AutoComplete feature disabled. --> Comments:<br/> <asp:textbox id="CommentsTextBox" autocompletetype="Disabled" runat="server"/> <br/> <br/><br/> <asp:button id="SubmitButton" text="Submit" runat="Server"/> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からAutoCompleteType 列挙体を検索する場合は、下記のリンクをクリックしてください。

- AutoCompleteType 列挙体のページへのリンク