File upload problem

P

PW

I'm writing a small system to allow users to upload documents to my server.
I'm using Persist AspUpload for this. I have 2 ASP files.

In the first ASP file I prompt the user for a file description and a
filename, like this ...

<FORM METHOD="POST" ACTION="sl_upload2.asp" ENCTYPE="multipart/form-data">
<TABLE>
<tr><td>Document description</td><td><INPUT TYPE="TEXT" NAME="DOCDESC"
SIZE="100"></td></tr>
<tr><td>Document filename </td><td><INPUT TYPE="FILE" NAME="DOCFILE"
SIZE="100"></td></tr>
</table>
<p>
<button type="submit" style="width:100px;height:25px;">Ok</button>
<button type="reset" style="width:100px;height:25px;">Clear</button>
</FORM>


In the 2nd ASP, which is the - ACTION="sl_upload2.asp" - file, I simply
perform the upload, like this ...

<%
Response.Write "<html>"
Response.Write "<head><title>St Lukes After School Care</title></head>"
Response.Write "<body bgcolor=" & Session("system_color_bg") & ">"

Set Upload = Server.CreateObject("Persits.Upload")
intCount = Upload.Save("C:/INETPUB/WWWROOT/SLASC/UPLOADS")

Response.Write "The file(s) have been stored successfully."
Response.Write "</BODY>"
Response.Write "</HTML>"
%>


No matter what I try (Get/Post/etc) I cannot get the DOCDESC and DOCFILE
values to pass through to the 2nd ASP file.

What can I do ?

Thanks,
PW
 
A

Adrienne Boswell

I'm writing a small system to allow users to upload documents to my
server. I'm using Persist AspUpload for this. I have 2 ASP files.

In the first ASP file I prompt the user for a file description and a
filename, like this ...

<FORM METHOD="POST" ACTION="sl_upload2.asp"
ENCTYPE="multipart/form-data">
<TABLE>
<tr><td>Document description</td><td><INPUT TYPE="TEXT"
NAME="DOCDESC"
SIZE="100"></td></tr>
<tr><td>Document filename </td><td><INPUT TYPE="FILE"
NAME="DOCFILE"
SIZE="100"></td></tr>
</table>
<p>
<button type="submit" style="width:100px;height:25px;">Ok</button>
<button type="reset"
style="width:100px;height:25px;">Clear</button>
</FORM>


In the 2nd ASP, which is the - ACTION="sl_upload2.asp" - file, I
simply perform the upload, like this ...

<%
Response.Write "<html>"
Response.Write "<head><title>St Lukes After School
Care</title></head>" Response.Write "<body bgcolor=" &
Session("system_color_bg") & ">"

Set Upload = Server.CreateObject("Persits.Upload")
intCount = Upload.Save("C:/INETPUB/WWWROOT/SLASC/UPLOADS")

Response.Write "The file(s) have been stored successfully."
Response.Write "</BODY>"
Response.Write "</HTML>"
%>


No matter what I try (Get/Post/etc) I cannot get the DOCDESC and
DOCFILE values to pass through to the 2nd ASP file.

What can I do ?

You have to look at the upload.form collection - see
http://www.aspupload.com/manual_simple.html for more information.

By the way, you might want to think about using less bloated code for
your form (tableless), and a stylesheet is a better idea than
bgcolor="<%=session(system_color_bg)%>" - and yes, a stylesheet CAN by
dynamic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top