开发者

Recaptcha ErrorMessage

I'm using the Recaptcha control in asp.net web forms. And i've faced with the problem about ErrorMessage. How to:


If you grab the latest source code you should find examples in dotnet/test folder.

ErrorMessage can be set through CustomTranslations property like here: 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;

    }

The ErrorMessage will be automatically displayed in a ValidationSummary because RecaptchaControl implements IValidator interface.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜