File Directory ASP.Net Tutorial

<%@ Page Language="C#" %>


    protected void Page_Load(object sender, EventArgs e)
    {
        System.IO.DriveInfo drive = new System.IO.DriveInfo(@"C:\");
        lblDriveName.Text = drive.Name;
        lblDriveType.Text = drive.DriveType.ToString();
        lblAvailableFreeSpace.Text = drive.AvailableFreeSpace.ToString();
        lblDriveFormat.Text = drive.DriveFormat;
        lblTotalFreeSpace.Text = drive.TotalFreeSpace.ToString();
        lblTotalSize.Text = drive.TotalSize.ToString();
        lblVolumeLabel.Text = drive.VolumeLabel;
    }



    Untitled Page


    
    

        
            
            
            
            
            
            
            
        
Drive Name:
                
            
Drive Type:
                
            
Available Free Space:
               
            
Drive Format:
                
            
Total Free Space:
                
            
Total Size:
                
            
Volume Label