Loop through all files in Images folder
-
Hi Everyone, I ve a simple testing Website and i used c#. I just want to list all FileNames from a specific folder.(e.g. Images) How can i loop through all files in Images folder in c#. User can upload images to that folder also. so i want to do the listing in Load event of the page. Please suggest..
Regards, -SIFAR.
-
Hi Everyone, I ve a simple testing Website and i used c#. I just want to list all FileNames from a specific folder.(e.g. Images) How can i loop through all files in Images folder in c#. User can upload images to that folder also. so i want to do the listing in Load event of the page. Please suggest..
Regards, -SIFAR.
Use
string[] arrFiles = Directory.GetFiles(strPath);
you will get the list files in a array of strings
Thanks & Regards Pete
-
Use
string[] arrFiles = Directory.GetFiles(strPath);
you will get the list files in a array of strings
Thanks & Regards Pete