---
title: "Add Google reCaptcha in Asp.Net Page"  
description: "Step 1:- Create a webpage  Step 2:- Download reCaptcha from given link and save it on your local system. http://www.google.com/recaptcha/whyrecaptchaS"  
author: "AVADHESH PATEL"  
published: 2012-07-27  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/327/add-google-recaptcha-in-asp-dot-net-page  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Add Google reCaptcha in Asp.Net Page

Step 1:- Create a webpage\

Step 2:- [Download](https://www.mindstick.com/articles/188403/website-to-download-photos-from-instagram) reCaptcha from given [link](https://www.mindstick.com/articles/23633/link-builder) and save it on your [local](https://www.mindstick.com/forum/395/hosting-on-iis-on-local-system-in-windows-7) system.

[http://www.google.com/recaptcha/whyrecaptcha](http://www.google.com/recaptcha/whyrecaptcha)

Step 3:- Now [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) on [Add Reference](https://www.mindstick.com/forum/548/how-to-add-reference-to-system-web-optimization)… and [select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) recently downloaded reCaptcha.dll file.

Step 4:- Now write down the following [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) where you want to add Google reCaptcha.

```
<recaptcha:RecaptchaControl ID="recaptcha" runat="server" PublicKey="6LfqmdQSAAAAAHcyeGDCoLodLISt4d3LyC5ghIOS"  PrivateKey="6LfqmdQSAAAAAFkZJAH9zivztO5VSwwJp_9XxcAt"/>
```

Step 5:-To [validate](https://www.mindstick.com/forum/1490/what-is-better-solution-for-validate-form-textboxs-value) the reCaptcha, write down the following code in .cs file

```
 recaptcha.Validate(); if (Page.IsValid){   // Write your code here when captcha successfully validated. } else {    // Write your error code here when captcha not successfully validated.  }
```

Now Google reCaptcha successfully added on your [aspx page](https://www.mindstick.com/forum/218/how-do-i-create-an-aspx-page-that-periodically-refreshes-itself).

---

Original Source: https://www.mindstick.com/blog/327/add-google-recaptcha-in-asp-dot-net-page

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
