Đ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 120

Đ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 120. 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 25 File I O and Streams file. If you want to display only the filenames you could use the Directory class s GetFiles method which returns a simple string array of filenames. Figure 25-4 Listing 25-6 shows how to use the TreeView control s SelectedNodeChanged event to bind your Gridview with the file information. Listing 25-6 Binding a GridView to directory files VB script runat server Protected Sub Page_Load ByVal sender As Object ByVal e As System.EventArgs If Not Page.IsPostBack Then For Each drive As System.IO.DriveInfo In System.IO.DriveInfo.GetDrives Dim node As TreeNode New TreeNode node.Value drive.Name If drive.IsReady Then node.Text drive.Name - free space drive.AvailableFreeSpace LoadDirectories node drive.Name Else node.Text drive.Name - not ready End If Me.TreeViewl.Nodes.Add node Next End If Me.TreeViewl.CollapseAll Continued 1150 Chapter 25 File I O and Streams End Sub Private Sub LoadDirectories ByVal parent As TreeNode ByVal path As String Dim directory As System.IO.DirectoryInfo _ New System.IO.Directorylnfo path Try For Each d As System.IO.DirectoryInfo In directory.GetDirectories Dim node As TreeNode New TreeNode d.Name d.FullName parent.ChildNodes.Add node Recurse the current directory LoadDirectories node d.FullName Next Catch ex As System.UnauthorizedAccessException parent.Text Access Denied Catch ex As Exception parent.Text Unknown Error ex.Message End Try End Sub Protected Sub TreeView1_SelectedNodeChanged _ ByVal sender As Object ByVal e As System.EventArgs Dim directory As System.IO.DirectoryInfo _ New System.IO.DirectoryInfo Me.TreeView1.SelectedNode.Value Me.GridViewl.DataSource directory.GetFiles Me.GridView1.DataBind End Sub script html xmlns http www.w3.org 1999 xhtml head runat server title Binding a Gridview title head body form id form1 runat server div table tr td style width 100px valign top asp TreeView ID TreeView1 runat server OnSelectedNodeChanged TreeView1_SelectedNodeChanged asp TreeView td td valign top asp .

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.