Posted on: 10/14/2013 6:53:09 AM | Views : 628

public void GetAllFileDetails() {
List<mList> mylist = new List<mList>(); DirectoryInfo d = new DirectoryInfo("WebSite1\\files");//Assuming Test is your Folder FileInfo[] Files = d.GetFiles("*.txt"); //Getting Text files foreach (FileInfo file in Files) { mList mobj = new mList(); mobj.Name = file.Name; mylist.Add(mobj); //string str = str + ", " + file.Name; } GridView1.DataSource = mylist; }

in my solution i have two folder files and  Docs...
i want list of all files name and path in gridview....i tried above method but i got exception ....in path somewhere

Go to the complete details ...