Access form post Data without request.Form

久未见 提交于 2019-12-11 02:17:17

问题


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")


来源:https://stackoverflow.com/questions/28902475/access-form-post-data-without-request-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!