tailieunhanh - Professional ASP.NET 3.5 in C# and Visual Basic Part 119
Professional in C# and Visual Basic Part 119. 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 25 File I O and Streams Working with Drives Directories and Files Many times in your applications you need to interact with the local file system reading directory structures reading and writing to files or performing many other tasks. The namespace within the .NET Framework makes working with file system directories and files very easy. While working with the classes in the namespace keep in mind that because your applications are executing on the server the file system you are accessing is the one your Web application is running on. You of course cannot use an application to access the end user s file system. The Driveinfo Class You can start working with the namespace at the top of the directory tree by using a great new addition to the .NET class libraries the Driveinfo class. This class supplements the GetLog-icalDrives method of the Directory class included in prior versions of the .NET Framework. It provides you with extended information on any drive registered with the server s local file system. You can get information such as the name type size and status of each drive. Listing 25-1 shows you how to create a Driveinfo object and display local drive information on a Web page. Listing 25-1 Displaying local drive information VB script runat server Protected Sub Page_Load ByVal sender As Object ByVal e As Dim drive As New C End Sub script html xmlns http 1999 xhtml head runat server title Displaying Drive Information title head body form id form1 runat server div table tr td Drive Name td td asp Label ID lblDriveName runat server Text Label td tr .
đang nạp các trang xem trước