.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sharon Maxwell

Post New Resource Bookmark and Share   

Display file information in GridView

Posted By:Hiren Soni       Posted Date: August 29, 2010    Points: 10    Category:    URL: http://www.dotnetspark.com  

Display file information in GridView

Display file information in GridView by assigning FileInfo[] to gridview datasource.

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;



Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend