Get file information (VB.net) : File « 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"))

      lblMessage.Text = "File information<br>" & _
         "<b>Name: </b>" & f.Name & "<br>" & _
         "<b>Path: </b>" & f.DirectoryName & "<br>" & _
         "<b>Last access time: </b>" & f.LastAccessTime & _
            "<br>" & _
         "<b>Last write time: </b>" & f.LastWriteTime & _
            "<br>" & _
         "<b>Length: </b>" & f.Length & " bytes"
   end sub
</script>
<html><body>
   <asp:label id="lblMessage" runat=server/>
</body></html>








10.1.File
10.1.1.Get file information (VB.net)
10.1.2.Opening a File (C#)
10.1.3.Opening a File (VB)
10.1.4.Delete a file (C#)
10.1.5.Delete a file (VB)
10.1.6.Creating a File (C#)
10.1.7.Creating a File (VB)
10.1.8.Load file content to DropDownList (C#)
10.1.9.Load file content to DropDownList (VB)
10.1.10.Rename File