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. Displaying Images using Gridview ASP.NET 2.0

Displaying Images using Gridview ASP.NET 2.0

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasebusinessquestion
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.
  • O Offline
    O Offline
    oceanexplorer
    wrote on last edited by
    #1

    Hi, I am currently trying to display images stored in a database using the new tool Gridview. However the images are stored as binary data in the database. Is there a way uisng Gridview to read this data and display the image? All I seem to be able to get is information on usin URL's to access the images, which does not fir my requirements. Many thanks in advance Paul Custance

    M 1 Reply Last reply
    0
    • O oceanexplorer

      Hi, I am currently trying to display images stored in a database using the new tool Gridview. However the images are stored as binary data in the database. Is there a way uisng Gridview to read this data and display the image? All I seem to be able to get is information on usin URL's to access the images, which does not fir my requirements. Many thanks in advance Paul Custance

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      You can either use the ImageField or TemplateField with an Image control, in the ImageUrl you can specify the url of a web page or a custom handler which is resposible for producing the image. In this web page ( or custom handler), you can simply save the binary data of the image into the output stream of the Response object. You can see the sample code in the Personal starter kit[^]

      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