Version

Dictionary Modes

In its standard functionality of generating random characters, the WebCaptcha™ control can be used in two modes: words, or logical questions and answers. To specify which one of these you want to use, the CaptchaDictionaryMode property has to be involved.

WebCaptcha_Dictionary_Modes_01
  • CaptchaDictionaryMode set to Words – in this mode the control uses words predefined in an external text file. You can set the path to your .txt file by using the CaptchaDictionaryPath property. The control gets a random line of this text file and generates the captcha image from it. So if you want to generate a captcha image from just one word, it must be on a separate line.

WebCaptcha_Dictionary_Modes_02
  • CaptchaDictionaryMode set to LogicalQuestionAnswer- in this mode the control uses predefined questions and answers in an external text file. The path to your text file is set as it is in the Words mode – by setting CaptchaDictionaryPath property. The control gets a random pair of question and answer, assuming that the first line goes for the question and the next one goes for the answer. There should be no empty lines. Here is an example of a text file with logical questions and answers:

How many months are in a year?

12

How many days are in a week?

7

How many minutes are in an hour?

60

WebCaptcha_Dictionary_Modes_03