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