 |
| Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics 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
|
|
|
|

June 4th, 2004, 04:48 AM
|
|
Authorized User
|
|
Join Date: Mar 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
ali
__________________
ali
|
|

June 4th, 2004, 04:54 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Ali,
For upload, you can check out this URL.
http://www.lewismoten.com/CodeLibrary/Browse/ASP/[All]/1.htm
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?
Cheers!
_________________________
-Vijay G
 Strive for Perfection 
|
|

June 4th, 2004, 04:59 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
|
|
I use AspJpeg and that seems to work pretty good.
|
|

June 5th, 2004, 04:59 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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.
Cheers!
_________________________
-Vijay G
 Strive for Perfection 
|
|

May 14th, 2005, 07:02 PM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

May 17th, 2005, 01:37 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just write a control structure to handle no image
eg.
<%
' 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">
<%
Else
' no image so display image placeholder or non at all
%>
<img src="images/noimage.gif" width="x" height="x">
<% End If %>
TDA
|
|

May 17th, 2005, 03:43 PM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks TDA for your trying but I got this error message
Expected ')'
on this line
If Len(objRS("product_image") > 0 Then
|
|

May 17th, 2005, 06:48 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
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
Matt
|
|

May 20th, 2005, 03:36 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes, Mat41 that's right .. I know that, but sometimes we got stupid ! Thanks to remind me.
;)
|
|
 |