M
majiofpersia
Hi all,
I am confused the mappath does not support virtual directories any more? I
realize that the ".." for the virtual directory to go to a higher level root
is not supported in .NET any longer ... but I can't get the mappath to work
with the backslash/forwardslash/ and no-slash to work either ... I have
tried pretty much every combination ... any ideas as what I am doing wrong
is appreciated ... Here is what I am trying to achieve ...
my code in directory:
c:/inetpub/wwwroot/practice/test.aspx
my file in directory
c:/inetpub/wwwroot/files/text.txt
in the code I want to get to the text file without providing the whole
physical path ..
I have tried the following and get errors for all of them... (in C#)
mappath("/files/text.txt"); - file not found in practice/files directory
mappath("\\files\\text.txt"); - file not found in practice/files directory
mappath("\files\text.txt"); - escape character error which makes sense
mappath("files\text.txt"); - file not found in practice/files directory
mappath("files/text.txt"); - file not found in practice/files directory
What am I doing wrong??
Thanks in advance,
- Maji
I am confused the mappath does not support virtual directories any more? I
realize that the ".." for the virtual directory to go to a higher level root
is not supported in .NET any longer ... but I can't get the mappath to work
with the backslash/forwardslash/ and no-slash to work either ... I have
tried pretty much every combination ... any ideas as what I am doing wrong
is appreciated ... Here is what I am trying to achieve ...
my code in directory:
c:/inetpub/wwwroot/practice/test.aspx
my file in directory
c:/inetpub/wwwroot/files/text.txt
in the code I want to get to the text file without providing the whole
physical path ..
I have tried the following and get errors for all of them... (in C#)
mappath("/files/text.txt"); - file not found in practice/files directory
mappath("\\files\\text.txt"); - file not found in practice/files directory
mappath("\files\text.txt"); - escape character error which makes sense
mappath("files\text.txt"); - file not found in practice/files directory
mappath("files/text.txt"); - file not found in practice/files directory
What am I doing wrong??
Thanks in advance,
- Maji