TAILIEUCHUNG - ASP.NET 4 Unleased - p 72

Tạo ra một giao diện người dùng tùy chỉnh cho Paging Nếu bạn cần kiểm soát hoàn toàn và hoàn toàn giao diện người dùng bằng tin nhắn, bạn có thể sử dụng TemplatePagerField để tùy chỉnh sự xuất hiện của các DataPager. Các trang trong Ví dụ 14,9 minh hoạ cách bạn có thể sử dụng TemplatePagerField. | 684 CHAPTER 14 Using the ListView and DataPager Controls Creating a Custom User Interface for Paging If you need total and complete control over the paging user interface you can use the TemplatePagerField to customize the appearance of the DataPager. The page in Listing illustrates how you can use the TemplatePagerField. LISTING @ Page Language C DOCTYPE html PUBLIC - W3C DTD XHTML Transitional EN http TR xhtml1 DTD script runat server protected void pg_PagerCommand object sender DataPagerCommandEventArgs e switch case Previous if 0 - 2 break case Next 2 break script html xmlns http 1999 xhtml head id Head1 runat server title DataPager Template title head body form id form1 runat server div asp ListView ID lstMovies DataSourceId srcMovies runat server LayoutTemplate ul id itemContainer From the Library of Wow eBook Using the DataPager Control 685 runat server ul asp DataPager id pg PageSize 2 Runat server Fields asp TemplatePagerField OnPagerCommand pg_PagerCommand PagerTemplate asp LinkButton id lnkPrevious Text Previous CommandName Previous Runat server asp LinkButton id lnkNext Text Next CommandName Next Runat server PagerTemplate asp TemplatePagerField Fields asp DataPager LayoutTemplate ItemTemplate li Eval Title li ItemTemplate asp ListView asp SqlDataSource id srcMovies SelectCommand SELECT Id Title Director FROM Movie ConnectionString ConnectionStrings con Runat server 14 div form body html From the Library of Wow eBook 686 CHAPTER 14 Using the ListView and DataPager Controls The TemplatePagerField in Listing contains two LinkButton controls see Figure . The first LinkButton has a CommandName set to the value Previous and the second LinkButton control has a CommandName set to the value Next. .

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.