我可以在ASP.NET中“保存" POST数据,以便可以通过Captcha进行验证吗? [英] Can i 'hold' POST data in ASP.NET, so i can verify with Captcha?

查看:88
本文介绍了我可以在ASP.NET中“保存" POST数据,以便可以通过Captcha进行验证吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个复杂的页面,可能包含十几个POST元素和一个文件上传(非Ajax ATM). 我有一个带有说明的表格,如果它导致akismet将其查找为垃圾邮件,我希望通知用户,然后在其浏览器上回击以重试,或者保留呼叫POST数据,以便用户可以填写reCaptcha来绕过垃圾邮件标记.

I have a complex page with maybe a dozen POST element and a file upload (non ajax ATM). I have a form with a description, if it causes akismet to find it as spam i would like the user to be informed and either hit back on their browser to try again or to hold call POST data so the user can fill in a reCaptcha to bypass the spam marking.

我如何保存POST数据?我不知道如何将用户重定向到此验证码页面并保留所有发布数据.如果它是通用的并且我不需要复制帖子并用手获取数据,那将是更好的选择.

How do i hold the POST data? i have no idea how to redirect the user to this captcha page and to keep all the post data. It would be preferable if it was generic and i didnt need to copy the post and get data by hand.

推荐答案

一种解决方案是使用所有接收到的数据创建隐藏的表单字段.一般而言,这很容易做到,只需遍历所有$ _POST元素并为每个元素创建一个新的隐藏字段. 显然,您必须创建一个有效的表单. 加载此新页面后,您应该重定向到所需的位置.

One solution could be to create hidden form fields with all received data. This is easy to do it generically, just iterate through all $_POST elements and create a new hidden field for each one. Obviously you must create a valid form. Once this new page is loaded you should redirect to desired location.

这篇关于我可以在ASP.NET中“保存" POST数据,以便可以通过Captcha进行验证吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆