如何在vb.net中验证两个文本框 [英] how to validate two textbox in vb.net

查看:68
本文介绍了如何在vb.net中验证两个文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有6个文本框.
点击保存按钮后,应检查以下内容
如果在文本框4中输入的值以400开头,则保存.
否则,如果文本框4中的值不是以400开头,则与数据库一起检查该值是否存在于数据库中.
如果存在,则保存条目
否则检查文本框5.如果文本框5中的值为29或31,则保存
否则清除字段或不保存..
请帮我.
我是vb.net的新手...

我非常需要它....

i have 6 text boxes.
on clicking save button it should check the following
if the value entered in textbox 4 is beginning with 400 then save.
else if value in textbox 4 is not starting with 400 then check with database whether the value exists in database.
if exists save entry
else check for textbox 5. if value in textbox 5 is 29 or 31 then save
else clear field or dont save..
please help me.
i am new to vb.net...
please
i need it very immediately....

推荐答案

听起来像简单的逻辑.很明显,您想要的是用代码描述的.因此,尝试编写强制执行这些规则的代码.对我来说,这听起来像是一次不错的学习练习,如果您遇到困难,可以随时向我们寻求具体帮助.要求我们为您完成所有工作并不是这个论坛的真正目的.
Sounds like simple logic. It''s pretty obvious what you want, you described it in code. So, try to write code that enforces those rules. Sounds like a good learning exercise to me, and if you get stuck, you can always ask us for specific help. Asking us to do all the work for you, is not really what this forum is for.


这篇关于如何在vb.net中验证两个文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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