验证码 [英] Validating captcha

查看:102
本文介绍了验证码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在验证验证码控件时遇到问题.

我已经在用户控件中创建了一个验证码,其中包含一个显示随机值的标签.

当我将其与文本框进行比较时,它显示错误.那么有人可以告诉我如何通过将文本框与用户控件的值进行比较来验证文本框吗?


代码:

Hi guys,

I have a problem in validating captcha control.

I have created a captcha in a user control, which has a label showing random values.

When I compare it to a textbox it shows error. So can anybody please tell me how to validate a textbox by comparing it to the value of user control?


Code:

<uc:MyCaptcha ID="CaptchaUserControl" runat="server" />
 
  <asp:TextBox ID="txtcaptcha" runat="Server">
 </asp:TextBox>



现在我必须将此文本框值与验证码控件进行比较.
我们怎么比较呢?
在此先谢谢您!



now i have to compare this text box value to captcha control.
how can we compare it .
thanks in advance !

推荐答案

这应该很容易做到,但是如果您向我们展示您的代码以及您认为错误的地方,它将变得更加容易.
这样就可以针对您的问题制定解决方案

(请不要执行完整的代码转储!只是出现问题的区域.)
This ought to be quite easy to do, but it would prove easier if you show us your code and where you think it is going wrong.
That way the solution could be made specific to your problem

(Don''t do a full code dump! just the area where you are having the problem).


这篇关于验证码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆