Display file information in GridView

Display file information in GridView

 

 

 

You can get assign fileinfo object to datasource property to gridview which display all the information of file in gridview.

 

Code Snippet:

 

 

        DirectoryInfo dir = new DirectoryInfo("C:\\WINDOWS\\");

        FileInfo[] fi = dir.GetFiles();

        GridView1.DataSource = fi;

        GridView1.DataBind();

       

 

 

 

 

Ebook Download
View all
Learn
View all