473,225 Members | 1,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,225 software developers and data experts.

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
3 28970
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: DC Gringo | last post by:
I'm getting a "BC30451: Name 'CRListType' is not declared." error Here's the top of the page where I'm getting stuck... <%@ Control Language="vb" AutoEventWireup="false"...
0
by: Ken Shaw Jnr | last post by:
Hi, I'm just wondering if anyone knows why when using links of the form <a href="/gsv/net....."> session variables are reset? Is there any way around this? cheers, Ken
4
by: Exits Funnel | last post by:
Hello, I'm slightly confused about when to use parens around #included files and when to use angle brackets. I understand (I think) that the difference is that the compiler will search in its...
3
by: Paul Janssen | last post by:
Hello! Can anyone help me out with the following situation: (a) a single query with 550 id's in the IN-clause resulting into 800+ seconds; (b) 550 queries with a single id in the IN-clause...
0
by: Henri | last post by:
Hi, I've built a custom control named Tree in MyNameSpace.Tree compiled into dans MyNameSpace.Tree.dll I've then designed a page index.asp with its code in index.aspx.vb (class PageIndex)....
0
by: Joeyej | last post by:
Hi - I'm trying to move/use a web form (containing some javascript field checks) previously hosted on a Windows 2000 server. However, the FORM METHOD="post..." command in the form (shown below)...
0
by: Ralf Gedrat | last post by:
Hello! I have a Application, this throws after some time following exception: Item has already been added. Key in dictionary: "- 1" key being added: "- 1" I use Application.Run with...
4
by: Kevin Blount | last post by:
bit long winded this one, so stick with me: I'm trying to create a form that can go to one of 3 places, depending on various elements. My form control looks like this: <form runat="server"...
1
by: mark4asp | last post by:
<form runat="server"automatically adds <divtag to code contained within. Is there a way to stop that? Mixing block-level elements with inline-level elements messes up the HTML becasuse that is...
1
by: ChollaPete | last post by:
This code: <form action="processScan.php" method="get"> <p> <?php print "Scan name: <input type=\"file\" name=\"tScanFileName\" value= \"{$scanFileName}\"><br>"; addHiddenCarryons(); ?>...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.