VB.NET 2008中的多个textBox验证 [英] Multiple textBox validation in VB.NET 2008

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

问题描述

任何一个:(

可以帮助我或教我任何一个

如何为4个或更多字段textBox创建textBox验证。

如果用户没有填写必填字段

,则保存按钮将保持在禁用模式...

hi any one :(
can any one there help me or teach me
how to create a textBox validation for 4 or more fields textBox.
so that if the user not complete a required fields
the save button is stay in Disable mode . . .

推荐答案

你可以在这里使用几种方法,但最简单的方法可能是在所有编辑框中捕获已更改的事件...



就在最后编辑消息处理程序,你可以调用一个全局函数来解决编辑框的状态...并根据编辑框状态激活或停用按钮。



还有其他方法,但这个方法可以帮到你。



祝你好运!
You can use several approaches here, but the easiest one probably would be to capture the "changed" event in all the edit boxes...

Just at the end of the editing message handler you could call a global function that would chekc the state of the edit boxes... and activate or deactivate the button according to the edit boxes status.

There are other methods, but this one could help you.

Good luck!


从这里开始:



使用自定义验证组件库扩展Windows窗体 [ ^ ]



如何:显示错误使用Windows窗体ErrorProvider组件进行表单验证的图标 [ ^ ]



Windows窗体中的用户输入验证 [ ^ ]
Start here:

Extending Windows Forms with a Custom Validation Component Library[^]

How to: Display Error Icons for Form Validation with the Windows Forms ErrorProvider Component[^]

User Input Validation in Windows Forms[^]


使用Windows中的错误验证控件或asp.net中的验证控件。
use the error validation controls in windows,or validation controls in asp.net.


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

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