<%@ 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>
|