我的MVC Web應用程序我需要使用驗證碼, 我沒有它喜歡加我從CodePlex上了,但在 頁面register.aspx我已經添加的代碼像下面這是給我CAPCHA在Mvc網絡應用程序需要使用驗證碼?
<%: CaptchaMVC.HtmlHelpers.CaptchaHelper.Captcha(Html,"Refresh","Input Symbols",5) %>
的DLL
代碼中的AccountController.cs:
[HttpPost]
public ActionResult NotAttribute()
{
if (this.IsCaptchaVerify("Captcha is not valid"))
{
TempData["Message"] = "Captcha is valid";
return View();
}
TempData["Message"] = "Captcha is not valid";
return View();
}
[HttpPost]
[CaptchaVerify("Captcha is not valid")]
public ActionResult UseAttribute()
{
if (ModelState.IsValid)
{
TempData["Message"] = "Captcha is valid";
return View();
}
TempData["Message"] = "Captcha is not valid";
return View();
}
但其不能正常工作在調試模式上註冊按鈕點擊它不能打任何一個這些方法 後爲什麼呢?
機器人可以被編程爲忽略隱藏字段(即使它們只被css隱藏)。小心。 – gdoron 2012-01-07 17:21:43
您如何看待普通用戶填寫隱藏字段?與FireBug? – gdoron 2012-01-07 17:36:37
@gdoron我明顯在說話而沒有想到今天.. – 2012-01-07 17:41:09