473,320 Members | 1,974 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,320 software developers and data experts.

ENCTYPE and Response.Form.Item(...) conflict?

I have an simple ASP form and I am using the following statement to get the
values:

emailFrom = Request.Form.Item("ctrl:EmailFrom")
emailTo = Request.Form.Item("ctrl:EmailTo")

However, after I added attribute ENCTYPE="multipart/form-data" to the HTML
tag <Form> for uploading files (not implemented yet). The above code doesn't
work and the value of Request.Form.Item("...") become "Undefined".

How to solve the problem? Thanks.
Jul 22 '05 #1
1 1970
nick wrote:
...after I added attribute ENCTYPE="multipart/form-data" to the
HTML tag <Form> for uploading files (not implemented yet). The above
code doesn't work and the value of Request.Form.Item("...") become
"Undefined".


Consider this:
http://www.w3.org/TR/1998/REC-html40...m-content-type

[multipart/form-data]

The content "multipart/form-data" follows the rules of all multipart
MIME data streams as outlined in [RFC2045]...

A "multipart/form-data" message contains a series of parts, each
representing a successful control. The parts are sent to the
processing agent in the same order the corresponding controls appear
in the document stream...

Each part is expected to contain:
1. a "Content-Disposition" header whose value is "form-data".
2. a name attribute specifying the control name of the
corresponding control...

Thus, for example, for a control named "mycontrol", the corresponding
part would be specified:

Content-Disposition: form-data; name="mycontrol"

As with all MIME transmissions, "CR LF" (i.e., `%0D%0A') is used to
separate lines of data.

Take a look here. The devil is in the details.
http://msdn.microsoft.com/library/en...ml/asp0900.asp
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Tim Gaunt | last post by:
Hi, I'm hoping that someone will be able to help me with this one, I'm developing an application which basically inserts a load of data into the database ready for validation at a later date, I...
12
by: Web Developer | last post by:
Hi, Question: Why is there an inherent conflict between uncompromising efficiency and portability in C++? Regards WD
2
by: Charles Fineman | last post by:
I've been asked to look over an integration toolkit that has a bunch of schemas to specify message format. There are a couple of strange things I noticed right off the bat and I wanted to get...
5
by: ortaias | last post by:
I have a form which calls up a second form for purposes of data entry. When closing the data entry form and returning to the main form, things don't work as expected. When I return to the main...
5
by: Simon | last post by:
Dear reader, I have two Forms they are both working with dada from the same tables. By typing in some changes in Form-B the changes are also visible in Form-A. There is no record lock...
4
by: crystal | last post by:
I've checked the threads but haven't been able to come up with a solution to my issue. Help...... I have a simple form based on a table. Within the form is a subform that is also, through a Q,...
1
by: lorirobn | last post by:
Hi, I have a query that I have been using as a record source for a form with no problems. I just created a new "addnew" form, and added 20 records to the table with this form. The problem I...
6
by: jpatchak | last post by:
Hello, I have a main form with one subform. I have a command button on the main form to delete the current record. Below is my code. The tables on which the main form and subform are based...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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: 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...
0
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.