DriveInfo info = new DriveInfo("C:");
this.Response.Write(info.DriveType.ToString() + "<br/>");
this.Response.Write(info.DriveFormat.ToString() + "<br/>");
this.Response.Write(info.TotalFreeSpace + "<br/>");
this.Response.Write("---------------------------------------------<br>");
DriveInfo[] infos = DriveInfo.GetDrives();
foreach (DriveInfo i in infos)
{
this.Response.Write("type:" + i.DriveType.ToString());
this.Response.Write("<br>");
this.Response.Write("name" + i.Name + "<br>");
if (i.DriveType!=DriveType.CDRom)
{
this.Response.Write("freespace:" + i.TotalFreeSpace.ToString() + "<br>");
}
this.Response.Write("========================================<br>");
}