Solved

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

Posted on 2004-05-01
6
5,570 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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…
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/…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 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