private void FillAllFile() { try { System.IO.DirectoryInfo di = new DirectoryInfo(Server.MapPath(ConfigurationManager.AppSettings[ " MultiTableFolder " ])); Comparison < FileInfo > comp = new Comparison < FileInfo > (compareMethod); FileInfo[] fi = di.GetFiles(); Array.Sort < FileInfo > (fi, comp); Repeater1.DataSource = fi; Repeater1.DataBind(); } catch { throw ; } } private int compareMethod(FileInfo fi1, FileInfo fi2) { int result = 0 ; try { if (fi1 == null ) { if (fi2 != null ) { result = - 1 ; } } else { if (fi2 == null ) { result = 1 ; } else { result = 0 - fi1.Name.CompareTo(fi2.Name); } } return result; } catch { throw ; } }