我开发了一个验证码验证。但它接受大写字母和小写字母。
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";
}
}
}