p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   Picture upload and display code (http://p2p.wrox.com/showthread.php?t=13759)

alitoday June 4th, 2004 04:48 AM

Picture upload and display code
Can any one send me technique/code(ASP) to upload a picture and display in web page,actually i want that user can upload their pictures to my website and me website can display it dynamically


happygv June 4th, 2004 04:54 AM

Hi Ali,

For upload, you can check out this URL.


For display, I am not sure what you mean by "display it dynamically". Can you post a bit clearer on how you want it to work?


-Vijay G
[8]Strive for Perfection[8]

DaveGerard June 4th, 2004 04:59 PM

I use AspJpeg and that seems to work pretty good.

om_prakash June 5th, 2004 01:57 AM

You can check the following article to upload /view images :


Om Prakash

happygv June 5th, 2004 04:59 AM

But storing images in access db as that URL specifies, would cost you lot of HDD space. You got to be careful about that, if you are not gonna store lesser number of images. Also I believe that access has a limitation of growing upto 1 GB, not more than that.


-Vijay G
[8]Strive for Perfection[8]

adelsun May 14th, 2005 07:02 PM

Ok I've got my db and I can display the images in an ASP page, so you can see the price of a peoduct as well as the image but the question here is: in case I have no image for a product it displays an empty box, how can I avoivd showing it.

tdaustin May 17th, 2005 01:37 AM

Just write a control structure to handle no image

' Check the length of the image
If Len(objRS("product_image") > 0 Then
' we have an image and run code for displaying image
<img src="images/<%= objRS("product_image") %>" width="x" height="x">
' no image so display image placeholder or non at all
<img src="images/noimage.gif" width="x" height="x">
<% End If %>


adelsun May 17th, 2005 03:43 PM

Thanks TDA for your trying but I got this error message

Expected ')'

on this line

If Len(objRS("product_image") > 0 Then

mat41 May 17th, 2005 06:48 PM

As the error says you are missing a ) - for every ( there must be a )

If Len(objRS("product_image")) > 0 Then

Wind is your friend

adelsun May 20th, 2005 03:36 AM

Yes, Mat41 that's right .. I know that, but sometimes we got stupid ! Thanks to remind me.

All times are GMT -4. The time now is 10:20 AM.

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