Đang chuẩn bị liên kết để tải về tài liệu:
Professional ASP.NET 3.5 in C# and Visual Basic Part 130

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

Professional ASP.NET 3.5 in C# and Visual Basic Part 130. Building on the revolutionary ASP.NET 2.0 release, ASP.NET 3.5 adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in ASP.NET 2.0 now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 26 User and Server Controls Bindable true DefaultValue public string Name get return _name set _name value Bindable true DefaultValue public string Text get return _text set _text value public override void DataBind CreateChildControls ChildControlsCreated true base.DataBind protected override void CreateChildControls this.Controls.Clear _message new Message Name Text if this.MessageTemplate null this.MessageTemplate new DefaultMessageTemplate this.MessageTemplate.InstantiateIn _message Controls.Add _message protected override void RenderContents HtmlTextWriter writer EnsureChildControls ChildControlsCreated true base.RenderContents writer To start to dissect this sample first notice the MessageTemplate property. This property allows Visual Studio to understand that the control can contain a template and allows it to display the IntelliSense for that template. The property has been marked with the PersistanceMode attribute indicating that the template control should be persisted as an inner property within the control s tag in the ASPX page. Additionally the property is marked with the TemplateContainer attribute which helps ASP.NET figure out what type of template control this property represents. In this case it s the Message template control you created earlier. 1251 Chapter 26 User and Server Controls The container control exposes two public properties Name and Text. These properties are used to populate the Name and Text properties of the Message control since that class does not allow developers to set the properties directly. Finally the CreateChildControls method called by the DataBind method does most of the heavy lifting in this control. It creates a new Message object passing the values of Name and Text as constructor values. Once the CreateChildControls method completes the base DataBind operation comtinues to execute. This is important because that is where the evaluation of the Name and Text properties occurs which allows you to insert these .

TÀI LIỆU 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.