TAILIEUCHUNG - Professional ASP.NET 3.5 in C# and Visual Basic Part 74

Professional in C# and Visual Basic Part 74. Building on the revolutionary release, 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 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 14 Site Navigation the new folder TreeViewLineImages which contains all the new images and styles you created. Look in the folder it is interesting to see what is output by the tool. Working with the TreeView Control Programmatically So far with the TreeView control you have learned how to work with the control declaratively. The great thing about is that you are not simply required to work with its components declaratively but you can also manipulate these controls programmatically. The TreeView control has an associated TreeView class that enables you to completely manage the TreeView control and how it functions from within your code. The next section looks at how to use some of the more common ways to control the TreeView programmatically. Expanding and Collapsing Nodes Programmatically One thing you can do with your TreeView control is to expand or collapse the nodes within the hierarchy programmatically. You can accomplish this by using either the ExpandAll or CollapseAll methods from the TreeView class. Listing 14-12 shows you one of the earlier TreeView controls that you used in Listing 14-6 but with a couple of buttons above it that you can now use to initiate the expanding and collapsing of the nodes. Listing 14-12 Expanding and collapsing the nodes of the TreeView control programmatically VB @ Page Language VB script runat server Protected Sub Button1_Click ByVal sender As Object ByVal e As End Sub Protected Sub Button2_Click ByVal sender As Object ByVal e As End Sub script html xmlns http 1999 xhtml head runat server title TreeView Control title head body form id Form1 runat server p asp Button ID Button1 runat server Text Expand Nodes OnClick Button1_Click asp Button ID Button2 runat server Text Collapse Nodes OnClick Button2_Click br br asp TreeView ID TreeView1 runat server DataSourceId SiteMapDataSource1 Continued 687 Chapter 14 Site Navigation asp

TỪ KHÓA 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.