Solved

Display and image from SQL Server

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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 video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
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…

726 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