How to display image in grid?

how to display image in a grid view or data list?

  • I've uploaded some data and images into the database. I want to retrive them by search button and show the searched values in DataList. database anil image anil k image kishore image And the WebPage looks like this: textbox[search button] If Users enters anil in the search box the correspondent name and image should be displayed in DataList. How can I get the data from database and build a DataList from it using asp.net and sql?

  • Answer:

    If you had a link to click that would open a new window to show the image, you could just return the image directly by changing the page response to stream the image bytes (and change the content type of the response appropriately). Since you need to display the image within the grid, the only way I can think of doing this (since you can't change the response of the request) is to request all of the files, save it temporarily on the server, and set an image link to the downloaded file.

Dotnet ReSource at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

this is webforms 101. there are numerous examples online. the "advanced" part is displaying images from a database. but again there are a number of examples on the web about displaying images stored in a database.

Jason Meckley

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.