Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. can't get to display image in gridview

can't get to display image in gridview

Scheduled Pinned Locked Moved ASP.NET
helpcsharpdatabasevisual-studiosysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Meax
    wrote on last edited by
    #1

    i have this table TBLImageTest ID int Path nvarchar(MAX) then i upload a image to server (local). image id and path saved to database. like: Id = 1, Path = C:\Documents and Settings\MyUserAccount\My Documents\Visual Studio 2005\WebSites\MyImageTest\UploadedImages\TestImage.jpg these exact things are saved into database. then in my allImages.aspx i have this code:

            SelectCommand="SELECT \[Path\] FROM \[TBLImageTest\]">
    

    this doesn't show any image, it doesn't give any error too. can someone help me with this

    C 1 Reply Last reply
    0
    • M Meax

      i have this table TBLImageTest ID int Path nvarchar(MAX) then i upload a image to server (local). image id and path saved to database. like: Id = 1, Path = C:\Documents and Settings\MyUserAccount\My Documents\Visual Studio 2005\WebSites\MyImageTest\UploadedImages\TestImage.jpg these exact things are saved into database. then in my allImages.aspx i have this code:

              SelectCommand="SELECT \[Path\] FROM \[TBLImageTest\]">
      

      this doesn't show any image, it doesn't give any error too. can someone help me with this

      C Offline
      C Offline
      CooperWu
      wrote on last edited by
      #2

      make sure all images can be accessed from IIS. but not in local. e.g. you can put images to a directory under IIS root. like \images, please you can access it like http:\\localhost\images\someimage1.jpg. if it show normally, then you can display it in anywhere. please check image path, e.g. c:\images\someimage1.jpg in asp.net webpage doesnot work.

      Glad to discuss with you and best wishes.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups