Visualizzare l'elenco di Files e Directories in un web
<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.IO" %>
<script language="vbscript" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fi As FileInfo = New FileInfo(Server.MapPath(""))
Dim di As DirectoryInfo = fi.Directory
Dim fsi As FileSystemInfo() = di.GetFiles()
Response.Write("Lista file e directory:" & di.FullName & "<hr>")
For Each info As FileSystemInfo In fsi
Response.Write(info.Name & "<br>")
Next
End Sub
</script>