一般问题-验证2个文本框 [英] General Question - Verifying 2 text boxes

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

问题描述

你好

我在寻找是否有人可以帮助我编写这个简单的代码.我确实在大学里上过VS课,但是已经有一段时间了,所以我忘记了大部分.我想在有2个文本框和1个按钮的地方使用它.

I was looking if anyone could help me out on writing this simple code. I did take a class on VS in college but its been a while so I have forgot most of it. I would like to make it where I have 2 text boxes and one button.

  1. 在其中一个文本框中,我将输入一个句子.
  2. 在第二个文本框中,我将输入相同的句子,但稍加修改后,其中一个单词的拼写会丢失
  3. 当我按下验证按钮时,它将检查两个文本框,以查看输入的每个句子是否相同.
  4. 如果它们相同,那么我会得到
  5. 如果它们不同,那么我会收到一条消息"different".并通过更改红色或类似文字来显示句子中错误的位置.

我无法添加图片作为示例,因为它说我需要验证我的帐户.

I am not able to add an image to give an example because it says I need to verify my account.


推荐答案

因此,您正在寻找显示 消息 相同"< if 一个控件中的文本与另一个控件中的文本等于其他您要显示消息不同".而您要在用户 点击的一个按钮.

So, you're looking to show the message "Same" if the text in one control is equal to the text in the other control, else you want to show the message "Different". And you want to do this when the user click's a button.

有足够的线索吗?


这篇关于一般问题-验证2个文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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