Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display Image in Datalist from Database

Posted on 2014-01-13
3
Medium Priority
?
247 Views
Last Modified: 2014-02-12
I have several hundred employee records in a database which contain routine data like first name, last name, title, and employee photo. The photos are stored in the database table using type (image) along with other data such as name, title, etc.  The photos need to be displayed on a search results page, along with the other relevant employee info.

What I need to do is bind the data from the database into a dataList, which I have done a million times before using just text, but have never had to serve up an image before.  Looking at the "image" control I have placed on my page which should display the employee photo, I'm not quite sure how (or where) to bind it to the photo.

These photos will be called up "on-demand" and are not physically stored in a directory anywhere, so it doesn't seem appropriate to use the ImageUrl property to bind.  Am I using the wrong control? Not sure how to start with this.

I have found a handful of articles on how to convert binary to image, but not sure if that's applicable since these are stored in the "image" format.  

Any help would be much appreciated.
0
Comment
Question by:vcbertini
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Surendra Nath earned 1500 total points
ID: 39777958
0
 

Author Comment

by:vcbertini
ID: 39778013
In that article they never really specified how to do it without using an httphandler. I'm having difficulty integrating an httphandler because my project is set up not as a regular website project, but rather a series of layouts designed for a content management solution and I'm not 100% sure where to put the handler so it will compile properly. I had big problems with that today.
0
 

Author Closing Comment

by:vcbertini
ID: 39853909
I was able to write a Handler, but since we are working within the confines of a content management system, it was an extremely slow solution and didn't work out great. I ended up re-programming everything to pull the images from our content management system instead of the database.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question