tailieunhanh - ASP.NET AJAX Programmer’s Reference - Chapter 8

Developing Client Controls Như đã thảo luận trong chương trước, lớp Component là lớp cơ sở cho tất cả các thành phần AJAX. Bên khuôn khổ AJAX khách hàng bao gồm hai lớp con quan trọng của lớp cơ sở Hợp phần: và . Vì vậy, khi nói đến việc lựa chọn một lớp cơ sở mà từ đó để lấy được lớp thành phần của bạn, bạn có ba lựa chọn: Hợp phần kiểm soát, và hành vi. Các chương trước đã giới thiệu cho các bạn làm thế nào để thực hiện một AJAX. | Developing Client Controls As discussed in the previous chapter the Component class is the base class for all AJAX components. The AJAX client-side framework includes two important subclasses of the Component base class and . Therefore when it comes to choosing a base class from which to derive your component class you have three options Component Control and Behavior. The previous chapter showed you how to implement an AJAX component that derives from the Component base class. This chapter first provides you with in-depth coverage of the Control class and its methods properties and events. Then it provides you with a recipe for developing AJAX components that derive from the Control class. Finally it uses this recipe to implement a custom control class. Control This section discusses the methods and properties of the Control base class. Because your custom controls must override the members of the Control class you need to have a good understanding of what each member does and how you should override them to provide your own implementation for these members. Definition Listing 8-1 presents the definition of the Control class. Note that this code listing registers the Control class as the subclass of the Component base class The Control class exposes several methods and properties which are discussed in the following sections. This section discusses the constructor of the class. Chapter 8 Developing Client Controls Listing 8-1 The Definition of the Control Class function Sys UI Control element if typeof undefined throw this element this if none _ parent null .

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.