Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 5th, 2005, 06:56 PM
DKY DKY is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 4 DKY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 44 sec
Reputation Power: 0
upload picture code

I have this code that I would like to upload a picture with. How do I do that with asp? Someone said to me once that I had to have a component or something? I also found something on the internet that said its a lot easier to do with asp.net My other question is what is the difference between asp and asp.net?

Reply With Quote
  #2  
Old April 5th, 2005, 07:21 PM
Lafinboy's Avatar
Lafinboy Lafinboy is offline
The Laughing Moderator
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Apr 2004
Location: Sydney, Australia
Posts: 3,267 Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)  Folding Points: 29199 Folding Title: Starter FolderFolding Points: 29199 Folding Title: Starter Folder
Time spent in forums: 2 Weeks 1 Day 10 h 48 m 12 sec
Reputation Power: 15
Send a message via ICQ to Lafinboy Send a message via AIM to Lafinboy Send a message via MSN to Lafinboy Send a message via Yahoo to Lafinboy Send a message via Skype to Lafinboy
What code do you have? With ASP you need to have a script, whether it be a COM or not, to handle the actual upload of data. There is built in funcionality for uploading in .NET.

As for how you 'do it' in ASP, the general method is that you provide a form for the user to browse their computer and select the file to upload. The form then submits to the upload script which transfers the file to the server. Specifics depend on what script/component you use.

As for differences between ASP and ASP.NET. The main one is that ASP is an interpretted language and .NET is a compiled language. Which boils down to - ASP code gets read and processed every time the page is called, .NET code is processed (compiled) once, making it much faster. There are a whole heap of other differences as well, and making a comparison between them is almost impossible because they are totally different things, even though they share a common name.

Reply With Quote
  #3  
Old April 5th, 2005, 09:46 PM
DKY DKY is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 4 DKY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 44 sec
Reputation Power: 0
Quote:
Originally Posted by Lafinboy
What code do you have? With ASP you need to have a script, whether it be a COM or not, to handle the actual upload of data. There is built in funcionality for uploading in .NET.

As for how you 'do it' in ASP, the general method is that you provide a form for the user to browse their computer and select the file to upload. The form then submits to the upload script which transfers the file to the server. Specifics depend on what script/component you use.

As for differences between ASP and ASP.NET. The main one is that ASP is an interpretted language and .NET is a compiled language. Which boils down to - ASP code gets read and processed every time the page is called, .NET code is processed (compiled) once, making it much faster. There are a whole heap of other differences as well, and making a comparison between them is almost impossible because they are totally different things, even though they share a common name.


All I have is a simple text box with a browse button and a send button. I have no idea what to do from there and I've tried all kinds of searching on the net. I must not be searching with the right keywords or something. Oh yeah, I also put a little if then statement so that if there's a value in the packing_list field in the database it will then put it in the <img> tag with the upload/ right behind it. So it looks for a picture in the upload directory. Here's my code below.

Code:
<html><head><title>PDC Hotline Form Tab Four</title>
<LINK REL="STYLESHEET" HREF="style.css">
<meta http-equiv="imagetoolbar" content="false"></head>
<body topmargin="2" leftmargin="0"><p align=center>
<table width="100%" cellspacing="0" cellpadding="0" border="0" bordercolor="#000000">
 <tr>
  <td width="1" style="border-bottom-style: solid; border-bottom-width: 1">&nbsp;</td>
  <td width="100" style="border-right-style: solid; border-right-width: 1" style="border-left-style: solid; border-left-width: 1" style="border-bottom-style: solid; border-bottom-width: 1" style="border-top-style: solid; border-top-width: 1" bgcolor="#cccccc" style="Cursor:Hand" onClick="window.location.href='PDC_Hotline_Submitted.asp?id  =<%=id%>&shcharge=<%=shcharge%>'" class='tabs'><p align=center>PDC Hotline</td>
  <td width="200" style="border-right-style: solid; border-right-width: 1" style="border-bottom-style: solid; border-bottom-width: 1" style="border-top-style: solid; border-top-width: 1" bgcolor="#cccccc" style="Cursor:Hand" onClick="window.location.href='Scheduler_Expeditor_Hotline.  asp?id=<%=id%>&shcharge=<%=shcharge%>'" class='tabs'><p align=center>Scheduler/Expeditor Hotline</td>
  <td width="100" style="border-right-style: solid; border-right-width: 1"  style="border-bottom-style: solid; border-bottom-width: 1" style="border-top-style: solid; border-top-width: 1" bgcolor="#cccccc" style="Cursor:Hand" onClick="window.location.href='PO_History.asp?id=<%=id%>&shcharge=<%=shcharge%>'" class='tabs'><p align=center>P.O. History</td>
  <td width="100" style="border-right-style: solid; border-right-width: 1" style="border-top-style: solid; border-top-width: 1" style="Cursor:Hand" class='tabs'><p align=center>Packing List</td>
  <td style="border-bottom-style: solid; border-bottom-width: 1">&nbsp;</td>
 </tr>
</table>
<%
If myRS("packing_list")<>"" Then
%>
<br><img src="../upload/<%=myRS("packing_list")%>"></img>
<%
Else
 %><p align=center>
<table width="550" cellspacing="0" cellpadding="0" border="0" bordercolor="#000000">
 <tr>
  <td><p align=center><font class='header'>Packing List</font><br><br></td>
 </tr><tr>
  <td><p align=center>
   <table cellspacing="0" cellpadding="0" border="0" bordercolor="#000000">
	<tr>
	 <td><form method="post" enctype="multipart/form-data" action="Packing_List.asp">File to upload: <input type=file name=upfile size="50"><br><br><p align=center><INPUT TYPE="submit" NAME="submit" VALUE="Submit Packing List"></form>
	 </td>
	</tr>
   </table>
  </td>
 </tr>
</table>
<%
End If
%>
</body>
</html>

Reply With Quote
  #4  
Old April 5th, 2005, 09:47 PM
DKY DKY is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 4 DKY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 44 sec
Reputation Power: 0
oh, one other thing. This is for my work and I'm unsure as to what kind of files they have (com or not as you said) that they would have, what would you recommend?

Reply With Quote
  #5  
Old April 6th, 2005, 02:37 AM
Lafinboy's Avatar
Lafinboy Lafinboy is offline
The Laughing Moderator
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Apr 2004
Location: Sydney, Australia
Posts: 3,267 Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)  Folding Points: 29199 Folding Title: Starter FolderFolding Points: 29199 Folding Title: Starter Folder
Time spent in forums: 2 Weeks 1 Day 10 h 48 m 12 sec
Reputation Power: 15
Send a message via ICQ to Lafinboy Send a message via AIM to Lafinboy Send a message via MSN to Lafinboy Send a message via Yahoo to Lafinboy Send a message via Skype to Lafinboy
I personally use and recommend Upload files without COM v3 - Lewis Moten, which is well commented and has example scripts to get you started. You should check whether your host server already has an upload COM installed first.

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > upload picture code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT