Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 7th, 2005, 04:22 AM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Trevor Miles
Default Displaying images stored in a DB on a Web Form

I have about 3000 images stored in a DB. I have a WinApp that is in operation that writes, read, and displays the images, so I know how to store the images in a DB table, and how to retrieve the images and display them on a Win Form.
For deployment reasons, I need to move to a Web App.
I cannot work out how to display the images directly from the DB and I do in the WinApp. I can see how to write the images I need to display to a folder and then bind these images to Image controls ImageURL property. But I want to avoid writing the images to a folder first before displaying them?
Is this possible? What do all the eCommerce people do?

 
Old January 7th, 2005, 05:37 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

What you need to do is create a separate ASPX page that retrieves the image from the database and returns in. You cannot mix your normal ASPX page with the image.

Then in your ASPX page, bind the image to the image page, like this:

ImageUrl="/ImageGenerator.aspx?ImageId=123"

You can substitute the 123 with the record ID from the db.

Search Google for BinaryWrite .NET and image and you'll find articles like this one:

http://www.aspfree.com/c/a/ASP.NET/R...--C---Part-II/

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Das alte Leid by Rammstein (Track 7 from the album: Herzeleid) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying images stored in MySQL through in PHP trufla PHP Databases 3 May 2nd, 2006 04:55 AM
displaying images in form page using ASP.net louie001 ASP.NET 1.0 and 1.1 Basics 0 February 23rd, 2006 06:26 AM
Displaying images stored in a DB on a Web Form Trevor Miles ASP.NET 1.0 and 1.1 Basics 0 January 7th, 2005 04:14 AM
displaying images from mySql DB in html cmcmillan.schillers Beginning PHP 1 October 5th, 2004 03:52 AM
displaying png in web form dotnettergirl Pro VB.NET 2002/2003 0 July 16th, 2003 10:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.