How to display image in <asp:Image> server control from local path or UNC network path
Posted on 2014-02-13
My web page was displaying images from this path just fine before we changed our domain as a result of our company rebranding:
<asp:Image runat="server" ID="IDPicture" ImageUrl="\\AnyServer\Pics\000000000.jpg" />
I know the path is correct because the image displays in the VS designer just fine. The only thing that's change is our domain, so the web address went from syep.wf1broward.com/admin.aspx to syep.careersource.com/admin.aspx.
Staff will be scanning images and saving them to either their local C:\ drive or a network share (\\AnyServer) and need to have them immediately displayed in the web application.
ImageUrl="C:\Pics\000000000.jpg" /> doesn't work
ImageUrl="\\AnyServer\Pics\000000000.jpg" /> doesn't work (It did before our rebranding)
Image Url="file:///C:/Pics/000000000.jpg" /> doesn't work
How can I get the images to show if they are stored on the local PC, i.e. "C:\Pics\000000000.jpg"?