How do I get number of Files from a folder using ASP.NET with C#?
Try following code to get count of files in the folder
string strDocPath = Server.MapPath('Enter your path here'); int docCount = Directory.GetFiles(strDocPath, "*", SearchOption.TopDirectoryOnly).Length;