Solved

ENCTYPE="multipart/form-data"/Request.BinaryRead issues

Posted on 2004-05-01
6
5,566 Views
Last Modified: 2010-08-05
Hi,

 I have a form with multiple fields of all types including: hidden, text, radio buttons etc. I also have one field name that is type: File - I used the ENCTYPE="multipart/form-data" in my form tag and request.form doesn't work. I did some research online and I didn't get a clear answer as to what my solution should be.

If I have the ENCTYPE="multipart/form-data" does that mean that request.form will NEVER work?

If I have a field name with type: file do I HAVE to USE ENCTYPE="multipart/form-data" in order for the file to be uploaded properly?

If ENCTYPE="multipart/form-data"  and type="file" work hand in hand with each other can someone give me some code to access the other fields excluding the file field (I've used the Pure ASP File Upload functionality to upload my file http://www.asp101.com/articles/jacob/scriptupload.asp) but I do have to process the other fields.

Thank you for all your help,
Aviva
0
Comment
Question by:avivak1
6 Comments
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10970043
You have to use ENCTYPE="multipart/form-data" for the file upload to work. And request.Form collection is unavailable when you use it. Instead in-order to access the forms collection, your upload script would have provided a collection similar to the Request.Form collection. looking at the upload class that you are using, you can access the form collection by calling uploader.Form("fieldname")

eg:

<%
  Dim MyUploader
  Set MyUploader = New FileUploader
  MyUploader.Upload()
Response.Write MyUploader.Form("txtName")
%>

Hope this helps...

Cheers!!
0
 

Author Comment

by:avivak1
ID: 10972568
Thanks, it did.

Regards,
Aviva
0
 
LVL 21

Accepted Solution

by:
ap_sajith earned 250 total points
ID: 10974545
Please  close this question off by accepting my previous comment.

Cheers!!
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 28

Assisted Solution

by:sybe
sybe earned 50 total points
ID: 10975624
Just a sidenote: Look at http://www.taka.nl/programming/asp/comparing_fileupload.asp and see that pure-script upload solution that you are using is not a very good one (slow and missing some basic functionality).
0
 

Author Comment

by:avivak1
ID: 10982073
Dear Sybe,

Thanks so much for your help - I decided to change uploading scripts and the freeASPUpload is super speedy thanks to you!

0
 
LVL 1

Expert Comment

by:CIT_DEV
ID: 11153668
It is late but i thought i would answer this question.

Use [FileUploader object].Form to access additional form variables submitted with
the file upload(s).

ie if you have a text field on the form with the name "iInspectID" use it as

iInspectID=Uploader.Form("iInspectID")

Enjoy
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JSON error 4 71
Classic ASP - problem with MS SQL Select Query? 10 60
IP API - need data... 4 27
If condition on Html with Asp 11 27
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question