I have an img
tag.
(I am using just image and not asp.net because it is an imageMap
that I have working with an img
).
I dynamically set the src
as below in 3 different ways. The first way works and the image is included in the project. But when I try to add the src
the 2nd way it fails to display the image. That image is not part of the project. I have even tried the 3rd way for a different location but it fails to load as well. It is not part of the project either. What I need to be able to do is load ans image src
dynamically that is not included in the project and have it display.
<img runat="server" class="ImageMap" id="ImageMapID" src="" usemap="#imagemap" />
ImageMapID.Attributes["src"] = @"/Icons/XXXX XXXX.png";//first way that works
ImageMapID.Attributes["src"] = @"/documents/XXXXX/XXXX_04092017.pdf"; // second way that fails
ImageMapID.Attributes["src"] = @"file://C:/temp/XXXXXXXX.pdf";// third way that fails
Any ideas anybody? I should add they are different images but they should all work.