Get directory information (VB.net) : Directory « File Directory « ASP.NET Tutorial






<%@ Import Namespace="System.IO" %>
<script language="VB" runat="server">
   
   sub Page_Load(Sender as Object, e as EventArgs)
      dim f as new FileInfo(Server.MapPath("test.aspx"))
    
      dim dir as DirectoryInfo = f.Directory
      
      lblMessage.Text += "Directory information<br>" & _
         "<b>Name: </b>" & dir.Name & "<br>" & _
         "<b>Full name: </b>" & dir.FullName & "<br>" & _
         "<b>Last access time: </b>" & dir.LastAccessTime & _
            "<br>" & _
         "<b>Last write time: </b>" & dir.LastWriteTime & _
            "<br>" & _
         "<b>Parent: </b>" & dir.Parent.Name & "<br>"
     
      
   end sub

</script>

<html><body>
   <asp:label id="lblMessage" runat=server/>
</body></html>








10.3.Directory
10.3.1.Get directory information (VB.net)
10.3.2.Get file names under a directory
10.3.3.AutoPostBack is true
10.3.4.Setting and displaying the application's working directory (C#)
10.3.5.Setting and displaying the application's working directory (VB)
10.3.6.static methods of the Directory class (C#)
10.3.7.static methods of the Directory class (VB)