ASP.NET AutoCompleteType property
Definition and usage
The AutoCompleteType property is used to set or return the type of AutoComplete for the TextBox control.
To assist users in data entry, Microsoft Internet Explorer 5 and later versions and Netscape both support a feature called auto-complete.
The AutoComplete feature can create a list of values entered in the text box. When the text box is used again, the list of entered values or displayed. Users can directly select values without needing to re-enter previously entered values.
Use the AutoCompleteType property to control the behavior of the auto-complete feature of the TextBox control. The System.Web.UI.WebControls.AutoCompleteType enumeration is used to represent the values that can be applied to the AutoCompleteType property.
Syntax
<asp:TextBox AutoCompleteType="cat" runat="server"/>
Property | Description |
---|---|
cat |
Specify the type of auto-completion. The default value is None. Possible values:System.Web.UI.WebControls.AutoCompleteType enumeration valueOne of them. |
Instance
The following example sets the AutoCompleteType mode to "HomePhone":
<form runat="server"> <asp:TextBox id="tb1" runat="server" AutoCompleteType="HomePhone" /> </form>
Instance
- Set the AutoCompleteType property of the TextBox control
AutoCompleteType enumeration
Member name | Description |
---|---|
BusinessCity | Office address city category. |
BusinessCountryRegion | Office address country/region category. |
BusinessFax | Office address fax number category. |
BusinessPhone | ประเภทหมายเลขโทรศัพท์ที่ตั้งที่อยู่สำนักงาน |
BusinessState | ประเภทรัฐที่ตั้งที่อยู่สำนักงาน |
BusinessStreetAddress | ประเภทที่อยู่ถนนที่ตั้งที่อยู่สำนักงาน |
BusinessUrl | ประเภท URL ของเว็บไซต์ธุรกิจ |
BusinessZipCode | ประเภทรหัสไปรษณีย์ที่ตั้งที่อยู่สำนักงาน |
Cellular | ประเภทหมายเลขโทรศัพท์มือถือ |
Company | ประเภทชื่อบริษัท |
Department | ประเภทแผนกในบริษัท |
Disabled | ปิดการใช้งานการเสริมความสมบูรณ์ของ TextBox |
DisplayName | ประเภทชื่อที่แสดงให้ผู้ใช้ |
ประเภทที่อยู่อีเมล | |
FirstName | ประเภทชื่อผู้ใช้ |
Gender | ประเภทเพศ |
HomeCity | ประเภทเมืองที่ตั้งที่อยู่บ้าน |
HomeCountryRegion | ประเภทประเทศ/โซนที่ตั้งที่อยู่บ้าน |
HomeFax | ประเภทหมายเลขโทรฟักซ์ที่ตั้งที่อยู่บ้าน |
Homepage | ประเภท URL ของเว็บไซต์ |
HomePhone | ประเภทหมายเลขโทรศัพท์ที่ตั้งที่อยู่บ้าน |
HomeState | ประเภทรัฐที่ตั้งที่อยู่บ้าน |
HomeStreetAddress | ประเภทที่อยู่ถนนที่ตั้งที่อยู่บ้าน |
HomeZipCode | ประเภทรหัสไปรษณีย์ที่ตั้งที่อยู่บ้าน |
JobTitle | ประเภทตำแหน่งงาน |
LastName | ประเภทนามสกุล |
MiddleName | ประเภทชื่อกลาง |
ไม่มีอะไร | ไม่มีประเภทใดที่เกี่ยวข้องกับ TextBox ควบคุม ทุก TextBox ควบคุมที่มี ID เดียวกันจะแบ่งปันรายการค่าเดียวกัน |
บันทึก | ข้อมูลเพิ่มเติมที่ต้องการรวมในประเภทหน้าจอ |
สำนักงาน | ประเภทที่ตั้งสำนักงาน |
เครื่องเพจ | ประเภทหมายเลขโทรศัพท์มือถือ |
ค้นหา | ประเภทคำค้นหาหรือเว็บไซต์ |