Results 1 to 5 of 5

Thread: Display an image from a file on the server

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Location
    Devon - UK
    Posts
    214

    Display an image from a file on the server

    Hi

    I'm having problems displaying an image.jpg from a file on the server. When I test the web app locally in vb.net it displays ok but when I upload to the server the image is blank

    Here is the code:-

    PersonalPicture.ImageUrl = "file:///" & objAppSettings.Item("Image Source") & "\" & Session("EmployeeID").replace(".", "") & "ResizedPicture.jpg"

    Where objappsettings.item("Image Source) = "e:\appname\images"

    Any thought much appreciated

    Regards

    Barry

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Display an image from a file on the server

    Do a server.mappath on that location, because it's pointing to a location on the server's hard drive, the image obviously doesn't exist on the user's machine.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Location
    Devon - UK
    Posts
    214

    Re: Display an image from a file on the server

    Thanks for that BUT:-

    When I FTP to the sight I can see the file and I also open a dadabase .mbd file using almost the same path.

    Regards

    Barry

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Display an image from a file on the server

    That's FTP. It has nothing to do with how web pages and images are displayed on the web page.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Location
    Devon - UK
    Posts
    214

    Re: Display an image from a file on the server

    Please forgive my ignorance.

    The image file is held in a folder such as D:\data\image. What ever I try I can't get it to display. I can open and resize the image and create the resiized image in the same folder but I can't get it to display.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width