
April 5th, 2005, 09:46 PM
|
|
Registered User
|
|
Join Date: Apr 2005
Posts: 4
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"> </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"> </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>
|