<%@ Import Namespace="System.IO" %>
<script language="C#" runat="server">
void Page_Load(Object Sender, EventArgs e) {
DirectoryInfo dir = new DirectoryInfo(Server.MapPath("."));
DataGrid1.DataSource = dir.GetFiles("*.*");
DataGrid1.DataBind();
}
</script>
<html><body>
<b>File information</b><br>
<asp:DataGrid id="DataGrid1" runat="server"
AlternatingItemStyle-Backcolor="#cccccc"
AutogenerateColumns="true" />
</body></html>
|