Putting CAPTCHAs on their own page?

Posted by mnemosyn on Stack Overflow See other posts from Stack Overflow or by mnemosyn
Published on 2010-03-25T17:45:03Z Indexed on 2010/04/03 3:33 UTC
Read the original article Hit count: 371

We need to put a captcha image on our ASP.NET MVC 2 based website. We chose reCaptcha and built it in using the way described by Derik Whittaker. The idea there is baiscally to build some abstractions and all you need to do is decorate your Controller with a [ValidateCaptcha] attribute. This works all fine.

However, we have a lot of form-widgets in different pages and I don't want to have the captcha floating around everywhere. So I'd like to implement it the way StackOverflow does: Submit a Form -> Challenge Captcha -> Submit Captcha -> Perform Action on original form data.

Now, how do I redirect the user to the captcha page while keeping the originally submitted information?

I thought of some very ugly hacks (hidden fields w/ base64 encoded form data, etc.) but I think I'm missing something obvious. On the other hand, this sounds as if I wanted to do something in a stateful manner, and I shouldn't?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about asp.net-mvc-2