Access form post Data without request.Form

2019-07-20 08:46发布

问题:

I know this is very weird but I get following error on my page and I know I can't have Request.form with ENCTYPE="multipart/form-data" Cannot call BinaryRead after using Request.Form collection.

My Actual Uploader page I use Forms collection to access form data like Uploader.Form("txtTitle").

But on this uploder page I have included couple of ASP pages which are standard thruout app for other security checks and etc and those pages use Request.form. What's other alternative to access form post data without Request.form on those security pages? Since those are common pages use by all other pages which don't have ENCTYPE="multipart/form-data" on their forms.

Thanks in advance!

回答1:

Put the includes' code which uses Request.Form inside a function, than pass values as parameters to the function instead of using Request.Form

So in your page it will look something like this:

<!--#INCLUDE FILE="myinclude.asp"-->
MyIncludeFunction Uploader.Form("MyIncludeFunctionParameter")

And in all other pages:

<!--#INCLUDE FILE="myinclude.asp"-->
MyIncludeFunction Request.Form("MyIncludeFunctionParameter")