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. images on gridview

images on gridview

Scheduled Pinned Locked Moved ASP.NET
databasesql-serversysadminlearning
5 Posts 3 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.
  • B Offline
    B Offline
    Britney S Morales
    wrote on last edited by
    #1

    Pals, i have problems to show images on gridview control. i have the image url saved onto a table columns in Sql server express 2005. ex C:\Inetpub\wwwroot\intranet\imagenes_usuarios\a\bio.jpg, the column name is urlimage i created an ImageField inside the gridview, its already set the dataurlimagefield value to urlimage, and the image dont show up. I lost something, refresh event, or something...:confused:

    keep Learning and you never will be out of date...

    N B 2 Replies Last reply
    0
    • B Britney S Morales

      Pals, i have problems to show images on gridview control. i have the image url saved onto a table columns in Sql server express 2005. ex C:\Inetpub\wwwroot\intranet\imagenes_usuarios\a\bio.jpg, the column name is urlimage i created an ImageField inside the gridview, its already set the dataurlimagefield value to urlimage, and the image dont show up. I lost something, refresh event, or something...:confused:

      keep Learning and you never will be out of date...

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      The obvious question is, are you sure the path is correct? Is it being correctly rendered in the urlimage property (path not image itself, of course)?


      only two letters away from being an asset

      B 1 Reply Last reply
      0
      • N Not Active

        The obvious question is, are you sure the path is correct? Is it being correctly rendered in the urlimage property (path not image itself, of course)?


        only two letters away from being an asset

        B Offline
        B Offline
        Britney S Morales
        wrote on last edited by
        #3

        I follow your suggest and i found that maybe gridview image colunm doesnt work with absolute url image, what do you think, ¿im right?? an Friend Britney :)

        keep Learning and you never will be out of date...

        N 1 Reply Last reply
        0
        • B Britney S Morales

          I follow your suggest and i found that maybe gridview image colunm doesnt work with absolute url image, what do you think, ¿im right?? an Friend Britney :)

          keep Learning and you never will be out of date...

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          I haven't tried it with absolute paths but I have with relative paths and it seems fine.


          only two letters away from being an asset

          1 Reply Last reply
          0
          • B Britney S Morales

            Pals, i have problems to show images on gridview control. i have the image url saved onto a table columns in Sql server express 2005. ex C:\Inetpub\wwwroot\intranet\imagenes_usuarios\a\bio.jpg, the column name is urlimage i created an ImageField inside the gridview, its already set the dataurlimagefield value to urlimage, and the image dont show up. I lost something, refresh event, or something...:confused:

            keep Learning and you never will be out of date...

            B Offline
            B Offline
            Bishoy Labib
            wrote on last edited by
            #5

            Absolute paths like this will never work on ASP.NET controls because the browser on the user PC will not understand where is the C drive on the server. You must convert this path to a relative path. May be by trimming the url string to remove the first characters until the page folder. like: <%# DataBinder.Eval(Container.DataItem, "urlimage").ToString().Substring(28) %>

            The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

            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