?
Solved

Display and image from SQL Server

Posted on 2008-10-23
5
Medium Priority
?
666 Views
Last Modified: 2013-12-17
I am able to upload an image to a SQL Server Database using C#, However, I am unable to read the image from the database and display it in an img element.  I am using ASP.NET 2.0.

Thank you for you help.  
0
Comment
Question by:shanemay
[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
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:mkosbie
ID: 22791815
You need to create a page to read the image data from the DB, then use that page as the source for your image.  http://www.codeproject.com/KB/asp/Display_Images_from_Data.aspx
0
 

Author Comment

by:shanemay
ID: 22791842
Is the same true for ASP.NET, the link has some good information, however, it references ASP only.

Thank you
0
 
LVL 8

Accepted Solution

by:
mkosbie earned 2000 total points
ID: 22791851
The procedure is the same in .NET, just translate the code from ASP/VBScript to .NET/C#.  Here's a page with C# code samples: http://www.aspfree.com/c/a/ASP.NET/Retrieving-Images-from-a-Database--C---Part-II/
0
 

Author Closing Comment

by:shanemay
ID: 31509480
Thank you for your help.  The solution makes so much sense now.  I really appreciate your help.  
0
 
LVL 8

Expert Comment

by:mkosbie
ID: 22791897
Glad to help.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
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…
Suggested Courses

764 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