TAILIEUCHUNG - ASP.NET AJAX in Action phần 7

Liệt kê 4,13 cho thấy một đoạn mã cố ý ném một ngoại lệ sau khi người dùng đã lựa chọn một thể loại âm nhạc mới từ danh sách thả xuống. Danh sách 4,13 ném một ngoại lệ để xem cách xử lý Tìm hiểu các phần mở rộng máy chủ Ajax | Introduction to Ajax-enabled controls 309 Figure In the extender model a server control receives the client functionality from the Extender control which provides the script references and script descriptors needed to wire a client component to the extended control. An AJAX extender is conceptually similar to an extender provider in Windows Forms. It keeps a portion of functionality separated from a server control and it provides additional properties to the extended control. These properties are used in turn to configure the properties of the client component that are associated with the extended control. NOTE To learn more about extender providers in Windows Forms browse to http en-us library . If you decide that both the server and the client capabilities should be specified in the same place you need a script control. It s a server control that is created as an Ajax-enabled control and can provide script references and script descriptors without the need for an external object. Returning to the example of an auto-complete text box the AutoCompleteTextBox class that derives from TextBox is a good candidate for becoming a script control. This model is illustrated in figure . Deciding whether to build an extender or a script control is a design choice you should make based on the requirements of the web application. Typically an extender is the right choice when you want to plug client functionality into an existing server control without the need to create a new control. A script control is the right choice if you want complete control over its capabilities both on the server and on the client side. 310 CHAPTER 9 Figure A script control is a server control that can both render markup code and provide the script references and script descriptors needed to instantiate client components. From a slightly different point of view the choice between an extender and a script control can be determined by the kind of .

TỪ KHÓA LIÊN QUAN
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.