locked
How do I set an image src to a network location? RRS feed

  • Question

  • User-1681793531 posted

    Basically I want the image tag to look like the following

    <img src="//networkpath/filename.jpg" />

    It works perfectly when I debug it in visual studio, but it doesn't work when I publish. 

    I assume that the credentials aren't being passed correctly.  How can I fix this?

    Thanks

    Tuesday, September 3, 2013 2:22 PM

Answers

  • User1508394307 posted

    What does networkpath mean, a web server?

    If this is an intranet and networkpath is a file server you can try

    <img src="file:///SERVER/FOLDER/filename.jpg" />

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 3, 2013 2:48 PM
  • User-1716253493 posted

    Add Virtual Directory to your site, set physical path to \\networkpath

    Then

    <img src="virtualdirectory/filename.jpg" />



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 3, 2013 9:42 PM

All replies

  • User1508394307 posted

    What does networkpath mean, a web server?

    If this is an intranet and networkpath is a file server you can try

    <img src="file:///SERVER/FOLDER/filename.jpg" />

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 3, 2013 2:48 PM
  • User-1716253493 posted

    Add Virtual Directory to your site, set physical path to \\networkpath

    Then

    <img src="virtualdirectory/filename.jpg" />



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 3, 2013 9:42 PM