我在asp.net web窗体中使用Recaptcha控件。我也面临着关于ErrorMessage的问题。如何:
发布于 2011-10-19 17:47:15
如果您获取最新的源代码,您应该可以在dotnet/test文件夹中找到示例。
ErrorMessage可以通过CustomTranslations属性设置,如下所示:recaptcha-plugins/dotnet/test/CustomTranslation.aspx.cs
protected void Page_Init(object sender, EventArgs e)
{
var customTranslation = new Dictionary<string, string>();
customTranslation.Add("instructions_visual", "Scrivi le due parole:");
customTranslation.Add("incorrect_try_again", "Scorretto. Riprova.");
RecaptchaControl.CustomTranslations = customTranslation;
}
ErrorMessage将自动显示在ValidationSummary中,因为RecaptchaControl实现了IValidator接口。
https://stackoverflow.com/questions/7512866
复制相似问题