How to download an image from a local PC shared folder?
I am writing this code to display an image from another PC on a local network:
string path = Path.Combine(@"\\BEHZAD-PC\foodimage", label1.Text+".jpg");
if(File.Exists(path))
{
pictureBox1.ImageLocation = path;
}
but the image is not showing in my application, where is the problem? Please help me.
+3
behzad razzaqi
source
to share
1 answer
The user must have permission on the image to be able to view it. In my opinion this is not a good practice as there are too many variables to view the image, I suggest you copy the image to your local drive and show it there.
0
Hussein khalil
source
to share