Solved

Display and image from SQL Server

Posted on 2008-10-23
5
663 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 500 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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

749 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