Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET AJAX Programmer’s Reference - Chapter 8

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

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 ASP.NET AJAX. Bên khuôn khổ ASP.NET 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: Sys.UI.Control và Sys.UI.Behavior. 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 ASP.NET AJAX. | Developing Client Controls As discussed in the previous chapter the Component class is the base class for all ASP.NET AJAX components. The ASP.NET AJAX client-side framework includes two important subclasses of the Component base class Sys.UI.Control and Sys.UI.Behavior. 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 ASP.NET 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 ASP.NET 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 Sys.UI.Control.registerClass Sys.UI.Control Sys.Component 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 Sys.UI.Control function Sys UI Control element if typeof element.control undefined throw Error.invalidOperation Sys.Res.controlAlreadyDefined Sys.UI.Control.initializeBase this this._element element element.control this this._oldDisplayMode this._element.style.display if this._oldDisplayMode this._oldDisplayMode none this._oldDisplayMode Sys.UI.Control.prototype _ parent null .

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.