Access form post Data without request.Form

2019-07-20 08:34发布

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条回答
兄弟一词,经得起流年.
2楼-- · 2019-07-20 09:13

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")
查看更多
登录 后发表回答