Passing variables when using enctype="multipart/form-data">

S

Steven K

Hello,

I am using an asp page (upload.asp) to gather information and to upload
files to the web server using SoftArtisans SAUpload Tool. In the first page
(upload.asp), I have a form for gathering info with the following:

<form method="POST" action="upload_ok.asp" name="frmUpload"
enctype="multipart/form-data">
<input type="hidden" name="cmdSearch" value="SearchValue">
<input type="hidden" name="cmdName" value="NameValue">

The problem I am having is that when I use [
enctype="multipart/form-data" ], the second form (upload_ok.asp), is not
picking up any of my form variables, or the first form (upload.asp) is not
sending them (cmdSearch or cmdName). If I remove the [
enctype="multipart/form-data" ] from the form in "upload.asp" then the
second form (upload_ok.asp) will get the variables.

Any help with this would be greatly appreciated...
 
R

Ray at

What component are you using to handle the upload? That component should
have a form collection, and you can get the other form values from it. The
syntax will be determined by what component you're using. It will often be
something along the lines of:

Set yourUploadComponent = CreateObject("Your.UploadComponentClassString")
sFormValue = yourUploadComponent.Form.Item("txtName").Value

or something like that. It should be covered in the documentation for your
component.
 
R

Roland Hall

:
: I am using an asp page (upload.asp) to gather information and to upload
: files to the web server using SoftArtisans SAUpload Tool. In the first
page
: (upload.asp), I have a form for gathering info with the following:
:
: <form method="POST" action="upload_ok.asp" name="frmUpload"
: enctype="multipart/form-data">
: <input type="hidden" name="cmdSearch" value="SearchValue">
: <input type="hidden" name="cmdName" value="NameValue">
:
: The problem I am having is that when I use [
: enctype="multipart/form-data" ], the second form (upload_ok.asp), is not
: picking up any of my form variables, or the first form (upload.asp) is not
: sending them (cmdSearch or cmdName). If I remove the [
: enctype="multipart/form-data" ] from the form in "upload.asp" then the
: second form (upload_ok.asp) will get the variables.

Looking in FileUp 5 docs, I see this:
When using an HTML form to upload files, the form submitting the file must
contain:

a.. The <form> tag attribute enctype="multipart/form-data".
b.. An <input type="file"> tag, including a name attribute.
http://support.softartisans.com/default.aspx?pageID=95


--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
C

Chris Baldwin

Steven K said:
enctype="multipart/form-data" ] from the form in "upload.asp" then the
second form (upload_ok.asp) will get the variables.

Steven, I suspect that you're trying to use the ASP Request.Form
collection to access form variables. You can't do that when the
enctype is "multipart/form-data". To access form values use FileUp's
Form collection instead:

Instead of:

Request.Form("name")

Use:

FileUpObj.Form("name")

-chris
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top