Class wwWebCaptcha

The CAPTCHA control can be used on a form to validate user input to increase the likelyhood that the page is filled by a live human as opposed to a robot or HTTP client. The control displays an image with a code that needs to be manually typed in to match and validate the request.

Using the control is as easy as dropping the control on a form, setting up the characters that it should display and a length of the string and font infomration. The control will then render the image for you as a separately loaded image. The image and text is rendered automatically.

To validate the input of the control you can check the IsValidated property which is true only if the user entered the correct code. Based on the result you can accept or fail the form submission.

wwWebControl wwWebCaptcha

Remarks

Requires wwImage.dll library.

This control uses Session to store the generated ID. Requires that EnableSessionState is true on the page or the InitSession is called in the Process class.

Class Members

MemberDescription
SubmitCaptcha Generates the Captcha value from the CaptchaChars and submits the Captcha value to Session state. This method is automatically called by the control when running in Web Control Framework page. If…
o.wwWebCaptcha.SubmitCaptcha()
ValidateCaptcha Checks to see if the Captcha code entered valid. This is automatically called in Web Control pages. For Process methods you can call this method to check validity. Note: In Process methods make…
o.wwWebCaptcha.ValidateCaptcha()
CapthaChars The characters that are used to make up the CAPTCHA expression displayed. The default is all uppercase letters and numbers except 0 and O. You can use any characters you chose.
CaptchaLength Number of characters to display
FontName The font used for the CAPTCHA image
FontSize The size of the font
IsValidated Determines whether the correct code was entered
Text Text displayed next to the CAPTCHA display

Assembly: webcontrolsextended.prg



© West Wind Technologies, 2025 • Updated: 2025-03-12
Comment or report problem with topic