Solved

Display and image from SQL Server

Posted on 2008-10-23
5
659 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
  • 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Suggested Solutions

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now