Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET 4 Unleased - p 11

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Chú ý Khi sử dụng Internet Explorer, bạn có thể cấu hình AutoComplete bằng cách chọn Tools, Internet Options, nội dung, và nhấp vào nút AutoComplete. Các ASP. NET Framework không hỗ trợ tính năng AutoComplete cho các trình duyệt khác như FireFox hay Opera. | 74 CHAPTER 2 Using the Standard Controls AutoCompleteType LastName Runat server br br asp Button id btnSubmit Text Submit Runat server div form body html FIGURE 2.7 Using AutoComplete with the TextBox control. NOTE When using Internet Explorer you can configure AutoComplete by selecting Tools Internet Options Content and clicking the AutoComplete button. The ASPNET Framework does not support AutoComplete for other browsers such as FireFox or Opera. Finally the TextBox control supports the Focus method. You can use the Focus method to shift the initial form focus to a particular TextBox control. By default no form field has focus when a page first opens. If you want to make it easier for users to complete a form you can set the focus automatically to a particular TextBox control contained in a form. From the Library of Wow eBook Accepting User Input 75 For example the page in Listing 2.9 sets the focus to the first of two form fields. LISTING 2.9 TextBoxFocus.aspx @ Page Language C DOCTYPE html PUBLIC - W3C DTD XHTML 1.0 Transitional EN http www.w3.org TR xhtml1 DTD xhtml1-transitional.dtd script runat server void Page_Load txtFirstName.Focus script html xmlns http www.w3.org 1999 xhtml head id Head1 runat server title TextBox Focus title head body form id form1 runat server div asp Label id lblFirstName Text First Name AssociatedControlID txtFirstName Runat server br asp TextBox id txtFirstName AutoCompleteType FirstName Runat server br br asp Label id lblLastname Text Last Name AssociatedControlID txtLastName Runat server br asp TextBox id txtLastName AutoCompleteType LastName Runat server br br asp Button 2 From the Library of Wow eBook 76 CHAPTER 2 Using the Standard Controls id btnSubmit Text Submit Runat server div form body html In Listing 2.9 the Page_Load event handler sets the form focus to the txtFirstName TextBox control. NOTE You can also set the form focus by setting either the Page.SetFocus method or the server-side HtmlForm control s DefaultFocus .

TÀI LIỆU LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.