AutoCompleteType 열거형

정의

TextBox 컨트롤에서 자동 완성 기능의 동작을 제어하는 값을 나타냅니다.

public enum class AutoCompleteType
public enum AutoCompleteType
type AutoCompleteType = 
Public Enum AutoCompleteType
상속
AutoCompleteType

필드

BusinessCity 23

회사 주소 범주의 도시입니다.

BusinessCountryRegion 24

회사 주소 범주의 국가/지역입니다.

BusinessFax 25

회사 주소 범주의 팩스 번호입니다.

BusinessPhone 26

회사 주소 범주의 전화 번호입니다.

BusinessState 27

회사 주소 범주의 시/도입니다.

BusinessStreetAddress 28

회사 주소 범주의 주소입니다.

BusinessUrl 29

회사 웹 사이트 범주의 URL입니다.

BusinessZipCode 30

회사 주소 범주의 우편 번호입니다.

Cellular 2

휴대폰 범주의 전화 번호입니다.

Company 3

회사 범주의 이름입니다.

Department 4

회사 범주 내의 부서입니다.

Disabled 1

TextBox 컨트롤에서는 AutoComplete 기능을 사용할 수 없습니다.

DisplayName 5

사용자 범주에 대해 표시할 이름입니다.

Email 6

사용자의 이메일 주소 범주입니다.

Enabled 32

TextBox 컨트롤에서는 AutoComplete 기능을 사용할 수 있습니다.

FirstName 7

이름 범주입니다.

Gender 8

사용자 범주의 성별입니다.

HomeCity 9

집 주소 범주의 도시입니다.

HomeCountryRegion 10

집 주소 범주의 국가/지역입니다.

HomeFax 11

집 주소 범주의 팩스 번호입니다.

Homepage 16

웹 사이트 범주의 URL입니다.

HomePhone 12

집 주소 범주의 전화 번호입니다.

HomeState 13

집 주소 범주의 시/도입니다.

HomeStreetAddress 14

집 주소 범주의 주소입니다.

HomeZipCode 15

집 주소 범주의 우편 번호입니다.

JobTitle 17

사용자의 직함 범주입니다.

LastName 18

성 범주입니다.

MiddleName 19

사용자의 이름 범주입니다.

None 0

TextBox 컨트롤과 연결된 범주가 없습니다. TextBox과 같은 모든 ID 컨트롤이 동일한 값 목록을 공유합니다.

Notes 20

폼 범주에 포함할 추가 정보입니다.

Office 21

회사 사무실 범주의 위치입니다.

Pager 22

호출기 범주의 전화 번호입니다.

31

웹 페이지 또는 웹 사이트 범주를 검색할 때 사용하는 키워드입니다.

예제

다음 예제에서는 사용 하는 방법에 설명 합니다 AutoCompleteType 에 대 한 자동 완성 범주를 지정 하는 열거형을 TextBox 컨트롤입니다.

중요

이 예제에는 사용자 입력을 허용하는 텍스트 상자가 있으므로 보안상 위험할 수 있습니다. 기본적으로 ASP.NET 웹 페이지는 사용자 입력 내용에 스크립트 또는 HTML 요소가 포함되어 있지 않은지 확인합니다. 자세한 내용은 Script Exploits Overview를 참조하세요.


<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>AutoCompleteType example</title>
</head>
<body>
    <form id="form1" 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="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>AutoCompleteType example</title>
</head>
<body>
    <form id="form1" 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>

설명

데이터 입력을 돕기 위해 Internet Explorer 5 및 이상 및 일부 기타 브라우저 자동 완성 기능을 지원 합니다. 자동 완성 입력란을 모니터링 하 고 사용자가 입력 한 값 목록을 저장 합니다. 사용자는 텍스트를 반환 하는 경우 다른 시간 상자에서 값의 목록이 표시 됩니다. 값을 다시 입력 하지 않고 사용자가이 목록에서 사용 하는 값을 선택 하기만 하면 됩니다 수 있습니다.

참고

일부 브라우저는 자동 완성 기능을 지원합니다. 호환성을 확인 하려면 브라우저를 사용 하 여 확인 합니다.

에 대 한 자동 완성 기능의 동작을 제어 하는 TextBox 컨트롤을 사용 하면는 AutoCompleteType 속성입니다. AutoCompleteType 열거형에 적용할 수 있는 값을 나타내는 데는 AutoCompleteType 속성입니다.

기본적으로 AutoCompleteType 에 대 한 속성을 TextBox 로 설정 되어 AutoCompleteType.None입니다. 이 설정을 사용 합니다 TextBox 제어 목록을 공유 하 고 다른 TextBox 같은 제어 ID 여러 페이지에서. 목록 간에 공유할 수도 있습니다 TextBox 에 따라 대신 범주를 기반으로 하는 컨트롤을 ID입니다. 설정한 경우 합니다 AutoCompleteType 속성을 범주 값 중 하나로 (같은 AutoCompleteType.FirstName 또는 AutoCompleteType.LastName) 모든 TextBox 같은 범주를 사용 하 여 컨트롤 같은 목록을 공유 합니다. 에 대 한 자동 완성 기능을 비활성화할 수 있습니다는 TextBox 설정 하 여 컨트롤을 AutoCompleteType 속성을 AutoCompleteType.Disabled입니다.

구성 및 자동 완성 기능 사용에 대 한 세부 정보에 대 한 브라우저 설명서를 참조 하세요. 예를 들어, Internet Explorer 5 이상의 버전에서의 자동 완성 기능을 사용 하 여 도구 메뉴에서 선택 인터넷 옵션 합니다. 선택 합니다 콘텐츠 탭 합니다. 선택 된 자동 완성 단추를 확인 하 고 자동 완성 기능에 대 한 옵션을 수정 합니다.

적용 대상

추가 정보