tailieunhanh - Manning ASP.NET AJAX in Action PHẦN 7

Hình 9,6 Trong mô hình mở rộng, một kiểm soát máy chủ nhận được các chức năng khách hàng khỏi sự kiểm soát Extender, cung cấp các tài liệu tham khảo kịch bản và mô tả kịch bản cần thiết để dây một thành phần khách hàng để kiểm soát mở rộng. | 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 .

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.