referencing images on the discountasp.net server

Discussion in 'ASP.NET 2.0' started by surfluds, Jan 24, 2006.

  1. I have uploaded a few pages to my site along with the images folder I was using on the local machine, now when I check the page on the internet the images are not showing, do I need to change the path in the img tag and if so to what?
    TIA
    Mike
     
  2. ok all, stupid me, got it going. try harder next time[​IMG]
     
  3. Hi Mike - My turn to be stupid [​IMG]


    I upload my images to my site directory (and confirm via FTP client that it's there).


    e:/web/xxx/htdocs/reunion/App_Data/Indiv_Pics/BurrowsB.jpg


    I then refer to the exact same location when I set the Image's ImageUrl property (confirmed via debug print)


    e:/web/xxx/htdocs/reunion/App_Data/Indiv_Pics/BurrowsB.jpg


    But the image does not show up (just the red x).


    Any ideas?
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    i don't think you can put pic in the ap_data directory.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. You got it Bruce -- thanks.
     
  6. App_Data is a protected directory. ASP.net 2.0 will not allow any external access to this folder. If you want to put external data (like images) in this folder, you will need a script or application that is available outside the App_Data folder that will read and output to the browser this data.


    Joel Thoms

    DiscountASP.NET
    http://www.DiscountASP.NET
     

Share This Page