Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 4th, 2004, 04:48 AM
Authorized User
 
Join Date: Mar 2004
Location: fsd, pb, Pakistan.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alitoday Send a message via Yahoo to alitoday
Default 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
Reply With Quote
  #2 (permalink)  
Old June 4th, 2004, 04:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
Reply With Quote
  #3 (permalink)  
Old June 4th, 2004, 04:59 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Minneapolis, MN, USA.
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
Default

I use AspJpeg and that seems to work pretty good.

Reply With Quote
  #4 (permalink)  
Old June 5th, 2004, 01:57 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

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

http://www.codeproject.com/useritems..._from_Data.asp

Om Prakash
Reply With Quote
  #5 (permalink)  
Old June 5th, 2004, 04:59 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
Reply With Quote
  #6 (permalink)  
Old May 14th, 2005, 07:02 PM
Registered User
 
Join Date: May 2005
Location: , , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
  #7 (permalink)  
Old May 17th, 2005, 01:37 AM
Authorized User
 
Join Date: Jun 2003
Location: Melbourne, Victoria, Australia.
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tdaustin Send a message via Yahoo to tdaustin
Default

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
Reply With Quote
  #8 (permalink)  
Old May 17th, 2005, 03:43 PM
Registered User
 
Join Date: May 2005
Location: , , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks TDA for your trying but I got this error message

Expected ')'

on this line

If Len(objRS("product_image") > 0 Then
Reply With Quote
  #9 (permalink)  
Old May 17th, 2005, 06:48 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

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
Reply With Quote
  #10 (permalink)  
Old May 20th, 2005, 03:36 AM
Registered User
 
Join Date: May 2005
Location: , , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display picture from database using JSP codes ban_gal Java Databases 6 May 30th, 2008 08:21 PM
Picture display Venkatesan General .NET 2 January 31st, 2007 08:27 AM
Upload picture Mitch PHP How-To 1 June 5th, 2006 08:54 AM
How to display a picture stored in SqlServer yiyufeiyang BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 March 27th, 2006 10:14 PM
How to upload a picture grstad Classic ASP Databases 5 February 28th, 2006 02:20 PM



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


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