Getting the contents of directory where default.aspx file is located?
-
Hi to all. I have problem here. I need to get array of directories contained in the directory where my default.aspx is. If I write so:
DirectoryInfo dir1 = new DirectoryInfo(@".");
I'm getting the "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE" directory. My question is: how can I get the DirectoryInfo of the directory where my default.aspx file is, not pointing to DirectoryInfo constructor the whole path? -
Hi to all. I have problem here. I need to get array of directories contained in the directory where my default.aspx is. If I write so:
DirectoryInfo dir1 = new DirectoryInfo(@".");
I'm getting the "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE" directory. My question is: how can I get the DirectoryInfo of the directory where my default.aspx file is, not pointing to DirectoryInfo constructor the whole path? -
string[] dirs = Directory.GetDirectories(Server.Mappath("")); Please let me know if it helps.
-
string[] dirs = Directory.GetDirectories(Server.Mappath("")); Please let me know if it helps.