AutoCompleteType 列挙体とは? わかりやすく解説

AutoCompleteType 列挙体

メモ : この列挙体は、.NET Framework version 2.0 で新しく追加されたものです。

TextBox コントロールの AutoComplete 機能の動作を制御する値を表します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

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

データ エントリを支援するために、Internet Explorer 5 以降および Netscape は AutoComplete と呼ばれる機能をサポートします。AutoComplete 機能はテキスト ボックスを監視し、ユーザーが入力した値のリストを作成します。ユーザーが後でテキスト ボックスに戻ると、このリストが表示されます。ユーザーは前に入力した値を再入力せずに、単にこのリストから値を選択できます。TextBox コントロールの AutoComplete 機能の動作を制御するには、AutoCompleteType プロパティを使用します。AutoCompleteType 列挙体は、AutoCompleteType プロパティに適用できる値を表すために使用されます。

メモメモ

AutoComplete 機能をサポートしないブラウザもあります。使用するブラウザで互換性を確認してください。

既定では、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>

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「AutoCompleteType 列挙体」の関連用語

AutoCompleteType 列挙体のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



AutoCompleteType 列挙体のページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS