TAILIEUCHUNG - ASP.NET 4 Unleased - p 165

Bạn chỉ định các tùy chọn postback tiên tiến bằng cách tận dụng các lớp PostBackOptions. Lớp này có các thuộc tính sau:. ActionUrl-Cho phép bạn chỉ định các trang mà dữ liệu mẫu được đăng. . Đối số-Cho phép bạn chỉ định một đối số postback. . AutoPostBack-Cho phép bạn thêm JavaScript cần thiết để thực hiện một sự kiện AutoPostBack. | 1614 CHAPTER 36 Building Custom Controls You specify advanced postback options by taking advantage of the PostBackOptions class. This class has the following properties ActionUrl Enables you to specify the page where form data is posted. Argument Enables you to specify a postback argument. AutoPostBack Enables you to add JavaScript necessary for implementing an AutoPostBack event. ClientSubmit Enables you to initiate the postback through client-side script. PerformValidation Enables you to specify whether validation is performed set by the CausesValidation property . RequiresJavaScriptProtocol Enables you to generate the JavaScript prefix. TargetControl Enables you to specify the control responsible for initiating the postback. TrackFocus Enables you to scroll the page back to its current position and return focus to the control after a postback. ValidationGroup Enables you to specify the validation group associated with the control. Imagine that you need to create a form that enables users to place a product order. However imagine that you want to create an advanced options check box. When someone clicks the advanced options check box the current form data is submitted to a new page that includes a more complex form. The AdvancedCheckBox control in Listing supports cross-page posts. When you click the check box the form data is submitted to the page indicated by its PostBackUrl property. NOTE Cross-page posts are covered during the discussion of Button controls in Chapter 2 Using the Standard Controls. LISTING using System using using namespace myControls public class AdvancedCheckBox WebControl From the Library of Wow eBook Processing Postback Data and Events 1615 private string _Text private string _PostBackUrl public string Text get return _Text set _Text value public string PostBackUrl get return _PostBackUrl set _PostBackUrl value protected override void AddAttributesToRender .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.