Qualcuno sa dirmi come faccio ad accedere al filesystem Object
in .net?
Ovvero come faccio a leggere i file in una directory?
Grazie.
Qualcuno sa dirmi come faccio ad accedere al filesystem Object
in .net?
Ovvero come faccio a leggere i file in una directory?
Grazie.
Usare il namespace System.IO è veramente semplice:
codice:... <%@ Import Namespace="System.IO" %> ... void Page_Load(object s, EventArgs e) { DirectoryInfo dir = new DirectoryInfo("c:\"); FileInfo[] files = dir.GetFiles("*.*"); foreach(FileInfo file in files) { Response.Write(" " + file.Name + ""); } } ...
grazie!