473,324 Members | 2,196 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,324 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 29008
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.