Display Images on Web Form specifying File Path

Posted on 2009-04-26
Last Modified: 2013-11-26
I need to display an image that is stored in a folder on the webserver that is NOT part of the root of the website, i.e.  D:\projects\project_number\photos\   and webserver is  D:\inetpub\wwwroot\website     etc.
The Image.ImageURL must have a relative path.    The images are related to a project and stored in the project file structure, so I am locating the image to load through project varialbe, i.e. project_number.  Once I generate the path to the photo, I cannot display the photo due to the relative path needed for ImageURL.  

What are my options to displaying the photo?   I want the code to open a new window and display the image.  

Question by:citechsolutions
    1 Comment
    LVL 53

    Accepted Solution

    You need to place them on a path on your webserver-structure. All the possibilities:
    ASP.NET Web Site Paths

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now