reCaptcha in c#


You must supply your own public/private recaptcha keys in the appSettings section
(you can create these at )

<html xmlns="">
<head runat="server">
    <title> reCaptcha in c# </title>
    <!-- recaptcha client library -->
    <script type="text/javascript" src=""></script>
    <form id="form1" runat="server">
            // don't show another captcha after success
            if (!Page.IsPostBack || (Page.IsPostBack && !Page.IsValid))
                // client-side captcha creation  (note the server-side injection of the public key and the page culture)
        <div id="recaptcha_div">
        <script type='text/javascript'>
            Recaptcha.create("<%=Config.PublicKey %>",
                "recaptcha_div", {
                    lang: "<%=LanguageCode %>",
                    theme: "red", // red,white,blackglass,clean
                    callback: Recaptcha.focus_response_field
        <asp:Button runat="server" ID="submitBtn" Text="Submit" OnClick="OnSubmit" />
        <% } %>
        <asp:CustomValidator runat="server" ID="recaptchaValidator" OnServerValidate="OnRecaptchaValidate"
            Text="Incorrect" />
        <asp:Label runat="server" ID="Outcome" />

 <add key="recaptcha_private" value="">
 <add key="recaptcha_public" value="">

captcha with , captcha control in c#

Download Code

reCaptcha in c# reCaptcha in c# Reviewed by Bhaumik Patel on 9:44 AM Rating: 5