S
Stephen E. Weber
I need to determine if a file exists using code.
I tried using the system.io.file.exists function, that will appears to
locate the file if I use the complete filespec, when I move the project to
the web server, that command will not work because I can not specify the
entire path, just the path relative to the default project folder.
Example
This is the path my image property uses: "~/image/NoImageAvailable.jpg"
If I use the above system.io.file.exists fails
if I use the full filespec: " E:\Documents and Settings\Steve\My
Documents\Visual Studio 2005\WebSites\GshockWatch\NoImageAvailable.jpg"
If I use the above system.io.file.exists succeeds.
You see how the second example would not work on an ISPs server.
any suggestions.
thanks
steve
I tried using the system.io.file.exists function, that will appears to
locate the file if I use the complete filespec, when I move the project to
the web server, that command will not work because I can not specify the
entire path, just the path relative to the default project folder.
Example
This is the path my image property uses: "~/image/NoImageAvailable.jpg"
If I use the above system.io.file.exists fails
if I use the full filespec: " E:\Documents and Settings\Steve\My
Documents\Visual Studio 2005\WebSites\GshockWatch\NoImageAvailable.jpg"
If I use the above system.io.file.exists succeeds.
You see how the second example would not work on an ISPs server.
any suggestions.
thanks
steve