What instead Request.Form when getting a BinaryRead error?
Question:
I know I read somewhere I couldn't use Request.Form in front of the pureasp extension (and that's why I'm now getting this error:
"Cannot call BinaryRead after using Request.Form collection"
but I don't remember what to replace it with?
Answer:
After you use the Pure ASP Upload you can't use the Request.Form collection. You should use instead UploadFormRequest(..)
So for example,instead of writing:
Request.Form("myfield")
Now you should write:
UploadFormRequest("myfield")
Note this is only the case AFTER the upload is executed, not when initialy the upload form is just displayed. So you can write the following code block that is only executed after the upload:
<%
If (CStr(Request.QueryString("GP_upload")) <> "") Then
'Do something with the other fields
myvar = UploadFormRequest("myvar")
end if
%>
Comments
Unfortunately solved problem 2 days after I did a workaround!!
Can you use UploadFormRequest as a collection?
i.e. in the same way you can use ' myStr = Request.Form ' which will populate myStr with the entire Form item/value pairs, can you use ' myStr = UploadFormRequest '?
This should be moved to 2.0
I was just having this issue, and didnt have a clue what to do. I only found it becuase I looked in the FAQ for the older version. So move this on up to the new version as well. :)
Also, I was able to do the following
CStr(Replace(UploadFormRequest(MM_fields(i)), Chr(34), """"))
RE: This should be moved to 2.0
RE: Unfortunately solved problem 2 days after I did a workaround!!
You must me logged in to write a comment.