Ok, I can probably clarify that, ....I would like to get the directory or folder name so that I can use it in my code, for example if the directory name is /projects/Default.aspx
I would write some code like
if (directory name = 'projects')
{
// do something here
}
So I would like to be able to get the directory name to use in my code, and for testing purposes I am using Response.Write(); to see if it works. I appreciate that code you gave me but is showing me too much data, I would just like the directory name.
I'm not entirely sure what you mean by "read my directory."
If you want to get the physical address of a relative path, you can use Server.MapPath("relPath")
If you need to read all the files in the directory or something like that, you can use the System.IO.DirectoryInfo object to do many things like that.