Using ASP.NET validation controls with recaptcha

In this video, we will discuss using ASP.NET validation controls with recaptcha control. This is continuation to Part 166. Please watch Part 166, before proceeding.

If you have a validation summary control on the page and if the Recaptcha control has failed validation it automatically displays the error message in Validation Summary control. All you need is a validation summary control on the page where you want the error message to appear.

Include validation summary control on the page<asp:ValidationSummaryID="ValidationSummary1"ForeColor="Red"runat="server"/>

Run the application and click the Submit Button. Notice that the error message is displayed in the validation summary control as expected.

Now let's discuss using a custom validator control with the recaptcha control. When the word verification fails we want to display a RED asterisk (*) next to the captcha control and the error message in validation summary control.

To achieve thisStep 1 : Include the custom validator on the page where you want the RED asterisk (*) to appear