ASP, multipart/form-data encoding

  • Thread starter Thread starter Jon Petrak
  • Start date Start date
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!
 
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
 
Tried that, with no luck. Going to take a look at the http headers to see if
I can narrow this down any.
 
For future reference, the issue was that ASP does not natively support that
encoding type and the data has to be parsed manually.
 
Back
Top