T
tshad
I am getting a list of files from a folder in my website and it displays
fine.
But it is not putting the actual path into the file column.
My code is:
DirectoryInfo dirInfo = new
DirectoryInfo(Server.MapPath("/integration/ImportFile/"));
articleList.DataSource = dirInfo.GetFiles("*.txt");
articleList.DataBind();
It shows the correct files, but if I select the filename to display it - it
can't find it.
What I get is:
http://localhost/integration/EmployeeExtras.txt
It should be:
http://localhost/inetpub/wwwroot/integration/EmployeeExtras.txt
What am I doing wrong here? Doesn't MapPath work correctly? It does get
the correct files - just not the correct paths.
Thanks,
Tom
fine.
But it is not putting the actual path into the file column.
My code is:
DirectoryInfo dirInfo = new
DirectoryInfo(Server.MapPath("/integration/ImportFile/"));
articleList.DataSource = dirInfo.GetFiles("*.txt");
articleList.DataBind();
It shows the correct files, but if I select the filename to display it - it
can't find it.
What I get is:
http://localhost/integration/EmployeeExtras.txt
It should be:
http://localhost/inetpub/wwwroot/integration/EmployeeExtras.txt
What am I doing wrong here? Doesn't MapPath work correctly? It does get
the correct files - just not the correct paths.
Thanks,
Tom