I'm trying to use the ASP Upload code to upload a file to the server. In addition, I'm allowing the user to enter information that will be included in an email. If I use the ASPUpload logic (uses a binary read) then I cannot use the request.form object to get my email information. I can get around this by using querystring. However, because the page renders before the user enters the information, my querystring values are null. I thought I could self post and if there is an email, the set all the email values and create another form posting to the submit page that will upload the file and send the email. This new form could pass the values using a querystring obtained from the first firm. Unfortunately, when I automatically submit this form the ASPUpload doesn't read the file that is being uploaded. If I view source, I can see that the Value for File1 is correctly set, but it just isn't getting a file count. Any idea on how I can submit this form automatically and get the ASPUpload to recognize that a file is being submitted?
<form method="post" ENCTYPE="multipart/form-data" action="emailsubmit.asp?user=<%=user%>&from=<%=from%>&subject=<%=subject%>&sendto=<%=sendto%>&message=<%=message%>&dateofmessage=<%=dateofmessage%>" name="emailsubmitform">
<table>
<TR>
<TD><INPUT TYPE=FILE SIZE=50 NAME="File1" value="<%=request("File1"%>"></td>
</TR>
</table>
</form>
<script language=javascript>
document.all.emailsubmitform.submit();
</script>
<form method="post" ENCTYPE="multipart/form-data" action="emailsubmit.asp?user=<%=user%>&from=<%=from%>&subject=<%=subject%>&sendto=<%=sendto%>&message=<%=message%>&dateofmessage=<%=dateofmessage%>" name="emailsubmitform">
<table>
<TR>
<TD><INPUT TYPE=FILE SIZE=50 NAME="File1" value="<%=request("File1"%>"></td>
</TR>
</table>
</form>
<script language=javascript>
document.all.emailsubmitform.submit();
</script>