Filling a Grid with Files in a Folder - C#
Posted
on ASP.NET 101
See other posts from ASP.NET 101
Published on Wed, 03 Feb 2010 14:00:22 GMT
Indexed on
2010/03/18
18:21 UTC
Read the original article
Hit count: 265
Filed under:
This code sample shows, in C#, how to get all the files within a specific folder, and list them all, including the file size, in a Gridview control.
To access the FileSystem, you’ll need to import the System.IO namespace, and to use a DataTable, you must import the System.Data namespace:
using System.IO;
using System.Data;
To access the FileSystem, you’ll need to import the System.IO namespace, and to use a DataTable, you must import the System.Data namespace:
using System.IO;
using System.Data;
© ASP.NET 101 or respective owner