TextBox.AutoCompleteType プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TextBox.AutoCompleteType プロパティの意味・解説 

TextBox.AutoCompleteType プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

TextBox コントロールオートコンプリート動作を示す値を取得または設定します

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

<ThemeableAttribute(False)> _
Public Overridable Property
 AutoCompleteType As AutoCompleteType
Dim instance As TextBox
Dim value As AutoCompleteType

value = instance.AutoCompleteType

instance.AutoCompleteType = value
[ThemeableAttribute(false)] 
public virtual AutoCompleteType AutoCompleteType { get;
 set; }
[ThemeableAttribute(false)] 
public:
virtual property AutoCompleteType AutoCompleteType {
    AutoCompleteType get ();
    void set (AutoCompleteType value);
}
/** @property */
public AutoCompleteType get_AutoCompleteType ()

/** @property */
public void set_AutoCompleteType (AutoCompleteType
 value)
public function get AutoCompleteType
 () : AutoCompleteType

public function set AutoCompleteType
 (value : AutoCompleteType)

プロパティ
TextBox コントロールオートコンプリート動作を示す System.Web.UI.WebControls.AutoCompleteType 列挙値の 1 つ既定値は None です。

解説解説

データ入力支援するために、Microsoft Internet Explorer 5 以降および Netscape ではオートコンプリートという機能サポートしてます。オートコンプリートは、テキスト ボックス監視しユーザー入力した値のリスト作成しますユーザー後でテキスト ボックスに戻ると、そのリスト表示されます。ユーザーは、前に入力した値を再入力する代わりに、このリストから値を選択するだけで済みますTextBox コントロールオートコンプリート機能動作制御するには、AutoCompleteType プロパティ使用しますAutoCompleteType プロパティ適用できる値を表すには、System.Web.UI.WebControls.AutoCompleteType 列挙体が使用されます。

メモメモ

一部ブラウザは、オートコンプリート機能サポートしていません。使用するブラウザ互換性確認してください

既定では、TextBox コントロールAutoCompleteType プロパティAutoCompleteType.None設定されています。この設定では、TextBox コントロールさまざまなページで同じ ID プロパティを持つ他の TextBox コントロールリスト共有しますID プロパティ代わりにカテゴリ基づいて TextBox コントロール間でリスト共有することもできますAutoCompleteType プロパティいずれかカテゴリ値 (AutoCompleteType.FirstNameAutoCompleteType.LastName など) に設定すると、同じカテゴリ値を持つすべての TextBox コントロールが同じリスト共有しますTextBox コントロールオートコンプリート機能無効にするには、AutoCompleteType プロパティAutoCompleteType.Disabled設定します

オートコンプリート機能設定有効化詳細については、ブラウザドキュメント参照してください。たとえば、Internet Explorer Version 5 以降オートコンプリート機能有効にするには、[ツール] メニューの [インターネット オプション] をクリックし、[コンテンツ] タブクリックします。[オートコンプリート] ボタンクリックしてオートコンプリート機能さまざまなブラウザ オプション表示して変更します

Internet Explorerオートコンプリート機能の詳細については、MSDN ライブラリ の「Using AutoComplete in HTML Forms」を参照してください

このプロパティテーマ別またはスタイル シート テーマ別設定することはできません。詳細については、ThemeableAttribute、ASP.NETテーマスキン概要 の各トピック参照してください

使用例使用例

AutoCompleteType 列挙体を使用して TextBox コントロールオートコンプリート カテゴリ指定する方法次のコード例示します

<%@ 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>

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


このページでは「.NET Framework クラス ライブラリ リファレンス」からTextBox.AutoCompleteType プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTextBox.AutoCompleteType プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTextBox.AutoCompleteType プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TextBox.AutoCompleteType プロパティ」の関連用語

TextBox.AutoCompleteType プロパティのお隣キーワード
検索ランキング

   

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



TextBox.AutoCompleteType プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS