ASP, multipart/form-data encoding

J

Jon Petrak

I'm sorry if this is the wrong newsgroup, but the ASP ones seem to be
devoid of any talk about ASP (and rather filled with spam).

I have a very simple form here that loops back into upon submission:

All I'm trying to do is test that the hidden field is passing properly (it's
not). It works fine when I remove the encoding property from the FORM tag,
but I need it to build a file upload component. I've noticed quite a few
messages on various newsgroups and forums regarding this issue, but none
seem to have an answer..
<% option explicit %>
<html>
<head>
<title>Test</title>
</head>
<body>
<% Response.Write("Hidval: " & request.Form("hidval")) %>
<form action="upload.asp"
enctype="multipart/form-data" method="post"
name="f" id="f">
Pick a file to upload:<br />
<input type="file" name="test" size="50" ID="File1"/>

<input type="hidden" name="hidval" value="test">
<input type="submit" value="submit" ID="Submit1" NAME="Submit1"/>
</form>
</body>
</html>I've been messing with this all day without luck, any insight would
be greatly appreciated!
 
M

Martin Dechev

Hi, Jon Petrak,

Most probably it is the parser that doesn't parse correctly the posted data.
As I don't have some code to check, could you try moving the hidden before
the input type=file control and then testing the value in the second page.

Hope this helps
Martin
 
J

Jon Petrak

Tried that, with no luck. Going to take a look at the http headers to see if
I can narrow this down any.
 
J

Jon Petrak

For future reference, the issue was that ASP does not natively support that
encoding type and the data has to be parsed manually.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top