2. Captcha Control in asp.net
Place Recaptcha.dll version 1.0.0.0.0 in Bin Folder and register it as:
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
<recaptcha:RecaptchaControl ID="recaptcha" runat="server"
--------------------------------
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
lblStatus.Text = "Captcha Validated!";
}
else
{
lblStatus.Text = "Invalid Captcha!";
}
}
Place Recaptcha.dll version 1.0.0.0.0 in Bin Folder and register it as:
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
<recaptcha:RecaptchaControl ID="recaptcha" runat="server"
PublicKey="6LeJZ8cSAAAAANskjZFY_tU5swJTihJ6yqBa0jcb"
PrivateKey="6LeJZ8cSAAAAAFJD3_Ww1KojLVtSHZ2ZcAUnjcW6"
Theme="red" />
// Theme=”red”, “White”, “blackglass” , ”clean”, “custom”
--------------------------------
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
lblStatus.Text = "Captcha Validated!";
}
else
{
lblStatus.Text = "Invalid Captcha!";
}
}
0 comments:
Post a Comment