Solved

Display Image in Datalist from Database

Posted on 2014-01-13
3
238 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 500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

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…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

762 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