我可以在ASP.NET中“保存" POST数据,以便可以通过Captcha进行验证吗?

编程入门 行业动态 更新时间:2024-10-23 19:25:31
本文介绍了我可以在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进行验证吗?

本文发布于:2023-06-07 21:56:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/568486.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可以通过   数据   NET   ASP   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!