Solved

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

Posted on 2004-05-01
6
5,561 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now