467,905 Members | 1,858 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,905 developers. It's quick & easy.

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

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...

--
Thanks in advance,

Steven
Jul 19 '05 #1
  • viewed: 27781
Share:
3 Replies
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.

--

Ray at home
Microsoft ASP MVP
"Steven K" <sk****@troop.com> wrote in message
news:OP****************@TK2MSFTNGP09.phx.gbl...
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...

--
Thanks in advance,

Steven

Jul 19 '05 #2
"Steven K" wrote:
: 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

Jul 19 '05 #3
"Steven K" <sk****@troop.com> wrote in message news:<OP**************@TK2MSFTNGP09.phx.gbl>...
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.


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
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Exits Funnel | last post: by
reply views Thread by Henri | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.