3
How to locate an image without entering the absolute path?
Image img = System.Drawing.Image.FromFile("~/Content/images/SemFoto.jpg");
I tried several ways and could not capture the image without informing the absolute path. The code line above is in a action within a controller.
I don’t understand. If you need to upload an image, you need to inform the physical path on the server.
– Leonel Sanches da Silva
You meant, "How to locate an image by informing the relative path instead of the absolute path"?
– OnoSendai
@Ciganomorrisonmendez need to pick up the image through the logical path from where the image is. Not the physical path referring to the disc.
– Gleison França
– Gleison França
Well, then @bigown’s answer is what you’re looking for.
– Leonel Sanches da Silva
@Gypsy omorrisonmendez Onesendai the response of the bigown solved. Thanks for the force.
– Gleison França