Hi,
I'm having a problem uploading an image when running a website from a share network. Could someone please give me some advice?
Here's my code:
*********************************
<Code behind>
string sfullpath = "C:\My Documents\My Pictures\Mypict.bmp";
FileInfo imgFile = new FileInfo(sfullpath);
if (!imgFile.Exists)
{
// Image not existed;
}
else
{
// Do something
}
************************************
Note: Everything is working fine if I run this website locally, but if I run it from another PC, it couldn't find the image file at all. However if I change sfullpath = "C:\Windows\Greenstone.bmp" it works fine. Is there something that I need to set from the web server to solve this problem? Please advice if you have any solutions. Thank you in advance.
Tinhtam
I'm having a problem uploading an image when running a website from a share network. Could someone please give me some advice?
Here's my code:
*********************************
<Code behind>
string sfullpath = "C:\My Documents\My Pictures\Mypict.bmp";
FileInfo imgFile = new FileInfo(sfullpath);
if (!imgFile.Exists)
{
// Image not existed;
}
else
{
// Do something
}
************************************
Note: Everything is working fine if I run this website locally, but if I run it from another PC, it couldn't find the image file at all. However if I change sfullpath = "C:\Windows\Greenstone.bmp" it works fine. Is there something that I need to set from the web server to solve this problem? Please advice if you have any solutions. Thank you in advance.
Tinhtam