ASP.NET के साथ reCAPTCHA का इस्तेमाल करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
अहम जानकारी: reCAPTCHA API का वर्शन 1.0 अब काम नहीं करता. कृपया वर्शन 2.0 पर अपग्रेड करें. ज़्यादा जानें
reCAPTCHA ASP.NET लाइब्रेरी,
आपकी ASP.NET वेबसाइट पर कैप् चा, बॉट रोकने में आपकी मदद करता है
सही ठहराया नहीं जा सकता. लाइब्रेरी में re कैप्चा API मौजूद है.
C# और Visual Basic .NET सहित किसी भी .NET भाषा की लाइब्रेरी का उपयोग किया जा सकता है.
ASP.NET के साथ reCAPTCHA का इस्तेमाल करने के लिए, re कैप्चा डाउनलोड किया जा सकता है
ASP.NET लाइब्रेरी.
क्विक स्टार्ट
एपीआई पासकोड के लिए साइन अप करने के बाद, इंस्टॉल करने के बुनियादी निर्देश नीचे दिए गए हैं
ASP.NET से अपनी साइट पर reCAPTCHA करना:
- अपनी वेबसाइट पर Library/bin/Release/Re कैप्चा.dll: विज़ुअल स्टूडियो में एक रेफ़रंस जोड़ें
वेबसाइट मेन्यू में, 'रेफ़रंस जोड़ें' चुनें और फिर डायलॉग बॉक्स में .NET टैब पर क्लिक करें. चुनें:
.NET के कॉम्पोनेंट की सूची से Re कैप्चा .dll कॉम्पोनेंट के बाद, 'ठीक है' पर क्लिक करें. अगर आपको
कॉम्पोनेंट पर, ब्राउज़ टैब पर क्लिक करें और अपनी हार्ड ड्राइव में असेंबली फ़ाइल ढूंढें.
- आपको जिस फ़ॉर्म को सुरक्षित करना है उसमें reCAPTCHA कंट्रोल डालें. इसके लिए, यह कोड स्निपेट जोड़ें:
एएसपी पेज में सबसे ऊपर, यह डालें:
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
इसके बाद, <form Runat="server"> के अंदर reCAPTCHA कंट्रोल डालें टैग:
<recaptcha:RecaptchaControl
ID="recaptcha"
runat="server"
PublicKey="your_public_key"
PrivateKey="your_private_key"
/>
आपको अपनी सार्वजनिक और निजी कुंजी को क्रम से PublicKey और PrivateKey में बदलना होगा.
- अपने फ़ॉर्म की पुष्टि करने के लिए, ASP.NET की पुष्टि करना न भूलें. आपको फ़ॉर्म सबमिट करने के दौरान, Page.IsValid की जांच करनी होगी.
नीचे एक "नमस्ते दुनिया" है reCAPTCHA की मदद से खोलें. C# सैंपल है
लाइब्रेरी डाउनलोड में शामिल है.
<%@ Page Language="VB" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
<script runat=server%gt;
Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
If Page.IsValid Then
lblResult.Text = "You Got It!"
lblResult.ForeColor = Drawing.Color.Green
Else
lblResult.Text = "Incorrect"
lblResult.ForeColor = Drawing.Color.Red
End If
End Sub
</script>
<html>
<body>
<form runat="server">
<asp:Label Visible=false ID="lblResult" runat="server" />
<recaptcha:RecaptchaControl
ID="recaptcha"
runat="server"
Theme="red"
PublicKey="your_public_key"
PrivateKey="your_private_key"
/>
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
</form>
</body>
</html>
इसके बारे में और पढ़ें
रंग-रूप को पसंद के मुताबिक बनाना
सलाह और दिशा-निर्देश
समस्या हल करने से जुड़ी जानकारी
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003ereCAPTCHA ASP.NET library offers a straightforward way to integrate CAPTCHA into your ASP.NET website to prevent bot abuse.\u003c/p\u003e\n"],["\u003cp\u003eVersion 1.0 of the reCAPTCHA API is no longer supported; users should upgrade to Version 2.0.\u003c/p\u003e\n"],["\u003cp\u003eThe library supports various .NET languages, including C# and Visual Basic .NET, and requires adding a reference to Recaptcha.dll in your project.\u003c/p\u003e\n"],["\u003cp\u003eTo implement reCAPTCHA, you need to insert specific code snippets, including a registration tag and the reCAPTCHA control with your API keys within your ASP.NET form.\u003c/p\u003e\n"],["\u003cp\u003eBasic installation instructions and a "Hello World" example in Visual Basic are provided to guide users through the integration process.\u003c/p\u003e\n"]]],["The document details integrating reCAPTCHA into ASP.NET websites using the ASP.NET library. Key actions include: adding a reference to `Recaptcha.dll` in Visual Studio, registering the reCAPTCHA control using a tag prefix, and inserting the control within the form, while substituting in personal API keys. You must ensure ASP.NET form validation is in place by checking `Page.IsValid`. It also notes that reCAPTCHA version 1.0 is outdated, urging an upgrade to version 2.0.\n"],null,[]]