What is the best recommendation for hooking the Captcha submission to a keyboard enter click, rather than verify code?
1 Answer, 1 is accepted
0
Pero
Telerik team
answered on 01 Jul 2009, 03:11 PM
Hi Mike,
Because, the RadCaptcha validates on a post back, the logical way to set the RadCaptcha validate on Enter key pressed, is to set the Enter key cause post back when it is clicked. One way to do this is by attaching an event handler to the "onkeypress" event of the RadCaptcha TextBox (the "onkeypress" event is attached dynamically to the TextBox), that will submit the form when Enter is pressed. The assumption here is that the user inputs the code as a last stage before the form is submitted. I have implemented a sample project that demonstrates the described scenario. Here is the full source code: