TAILIEUCHUNG - Display Data Using the Repeater Control

5,5 Hiển thị dữ liệu Sử dụng Repeater Control Tôi có nghe nói rằng việc kiểm soát Repeater là một điều khiển tuyệt vời cho hiển thị một danh sách chỉ đọc các giá trị, bao gồm các siêu liên kết. Làm thế nào để cư một điều khiển Repeater và tận dụng các mẫu để hiển thị các dữ liệu cách tôi muốn nó nhìn? | Display Data Using the Repeater Control I have heard that the Repeater control is a great control for displaying a read-only list of values including hyperlinks. How do I populate a Repeater control and take advantage of templates to display the data the way I want it to look Technique The Repeater control allows you to list data in various formats such as bulleted or numbered. It relies on the use of templates to display information in a list format. This How-To shows you how to use the Repeater control not only to display a list but also to use a couple of different controls-a Button and HyperLink-to display another list using the Repeater control. The second list will be displayed using the button on the same page as the first list. The hyperlink will take you to another page to display the second list. A main tool in the creation of the Repeater control is the use of templates. Use of Templates Templates are used within HTML and allow you to include controls in your Web server controls. Within a template you can specify various details about the area for which you are creating a template. Following is a list of the templates HeaderTemplate ItemTemplate FooterTemplate AlternatingItemTemplate SeparatorTemplate You can get an idea of what each of the templates is used for by its name. Here is an example of the HeaderTemplate used in this How-To HeaderTemplate font face Arial Black size 2 List of Regions font br HeaderTemplate These lines are literally used as a template for how you want the section to be laid out as well as what data to display. For the ItemTemplate in this How-To two controls are displayed a button and a hyperlink shown by this snippet of the HTML asp Button runat server Text RegionlD asp HyperLink Runat server Text Container NavigateURL Container ID HyperLink1 As the name implies the DataBinder supplies data from the data

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.