我在MVC 2.0中创建Recaptcha。我使用以下代码来创建验证码。
public static class Captcha
{
public static string GenerateCaptcha(this HtmlHelper helper)
{
var captchaControl = new Recaptcha.RecaptchaControl
{
ID = "recaptcha",
Theme = "blackglass",
PublicKey = "000000",
PrivateKey = "00000"
};
captchaControl.Theme = "white";
var htmlWriter = new System.Web.UI.HtmlTextWriter(new System.IO.StringWriter());
captchaControl.RenderControl(htmlWriter);
return htmlWriter.InnerWriter.ToString();
}
}这里我使用了一个白色主题,它已经在Recaptcha中可用。我想创建我自己的主题并实现它。该怎么做呢?
发布于 2011-12-07 18:44:38
你可以在下面的博客和链接中找到你的解决方案:
http://chenz101tutorials.blogspot.com/2009/08/customize-recaptcha-remove-theme-aspnet.html
http://captcha.biz/doc/asp.net/2.0/csharp/asp.net-mvc-captcha-code-sample.html
http://wiki.asp.net/page.aspx/1567/recaptcha/
https://stackoverflow.com/questions/8413380
复制相似问题