Captcha接受大写和小写字母

时间:2013-08-30 05:32:12

标签: asp.net captcha

我开发了验证码验证。但它接受大写字母和小写字母。

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void btnVerify_Click(object sender, EventArgs e)
    {
        Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim());
        if (Captcha1.UserValidated)
        {
            lblMessage.ForeColor = System.Drawing.Color.Green;
            lblMessage.Text = "Valid";
        }
        else
        {
            lblMessage.ForeColor = System.Drawing.Color.Red;
            lblMessage.Text = "InValid"; 
        }
    }
}

0 个答案:

没有答案