DevExpress ASPxCaptcha Integration

0
0

Hello everyone,

we are looking to integrate the ASPxCaptcha Control by DevExpress.

To achieve this we tried to use the ASPNetControl Wrapper, but faced some issues validating the CaptchaCode.

The ASPxCaptcha Control provides a property called “IsValid” and a Property “Code”, which should contain the CaptchaCode and IsValid tells if the user entry is valid.

Apparently we can not access those properties outside of the OnLoad and OnInit Events, so we tried to store the Code Property into a Property of our Wrapper Control and do a manual comparison of the Code against a WiseJ TextBox. But the Code will always be null.

Long story short: We did not manage to integrate the ASPxCaptcha Control so far.

 

Our question now is: Can you provide us some help or ideally a sample project, to integrate the ASPxCaptcha Control?

 

Thank you very much for your assistance!

  • You must to post comments
0
0

I don’t think you can use the AspNet captcha in Wisej as an independent control without also adding a submit button (like you see in the DevExpress sample: https://demos.devexpress.com/ASPxEditorsDemos/ASPxCaptcha/Features.aspx) because it requires posting to an asp.net form while Wisej is a Single Page Application (SPA) and we don’t post anything.

In ASP.NET if you don’t post the form and all the fields you don’t get any value on the server.

In general captchas work with older web technologies with <form> and <button> etc. that a bot can post. An SPA or Javascript system usually don’t have any of those features and everything is a <div>. There is nothing for a bot to push, check or submit.

Anyway, see attached sample. The way ASPxCaptcha generates codes and updates the server is all documented at DevExpress.

  • You must to post comments
0
0

Hi Luca,

did the sample help?
Do you need additional information?

Thank you for looking into the problem.

  • You must to post comments
0
0

Hi Luca,

thank you for your reply.

Please find a sample project attached, that i used to play around integrating the captcha control.

The sample contains an AspNetControl Wrapper, that wraps the ASPxCaptcha Control and one window.
The goal is to validate the captcha, when the user clicks the button “Check captcha”. The captcha control by DevExpress has its own TextBox and has the Property “IsValid”, which tells if the Captcha is valid. But as we did not find a way to access this property in WiseJ, we tried saving the Code of the captcha within the OnInit/OnLoad methods and match the code against the text value of a WiseJ Textbox. Onfortunately the code property always returned null, until the code got refreshed.

I hope this sample is of use to you.
Thank you very much for your assistance.

 

 

Attachment
  • You must to post comments
0
0

“Apparently we can not access those properties outside of the OnLoad and OnInit Events”

You are correct. ASP.NET properties do not exist outside of the page load cycle, that’s the nature of ASP.NET.

Can  you attach a sample app?

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.