Hi I want to get only name of the files from a folder without the full path. Here is my code so far (asp.net)
string[] files = Directory.GetFiles(Server.MapPath("~/Files/"));
List<string> filenames = new List<string>();
for (int i = 0; i < files.Length; i++)
{
filenames.Add(files[i]);
}
GridView1.DataSource = filenames;
GridView1.DataBind();
How would I accomplish this in asp.net Thanks again