我可以在c#.net中基于窗口的应用程序中使用验证控件吗? [英] Can i use validation controls in window based application in c#.net.

查看:74
本文介绍了我可以在c#.net中基于窗口的应用程序中使用验证控件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在基于C#的基于窗口的应用程序中使用验证控件..net我可以使用该控件以及如何使用

i want to use validation control in my window based application in c# .net can i use that & how

推荐答案

您可以使用ErrorProvider组件,该组件显示用户出现问题,并提供了带有附加信息的工具提示...

检查此示例
在此处链接 [ ^ ]
You can use the ErrorProvider component, which shows the user there''s a problem and provides a tooltip with extra information...

Check This Example
Link here[^]


您永远无法在Winforms中使用基于ASP.NET的控件.如果您认为自己可以做到,那就完全不知道什么是ASP.NET或它是如何工作的.您应该阅读一些基本书籍.

就像其他人所说的那样,有些控件可以在winforms中使用.您也可以只编写自己的验证代码,因此Winforms的使用起来更加灵活.首先有一个maskededitbox,尽管我不想使用它,但它确实允许您验证输入.
You can''t ever use ASP.NET based controls in winforms. If you think you might be able to, it''s a sign you have absolutely no idea what ASP.NET is or how it works. You should read some basic books.

As someone else said, there are controls you can use in winforms. You can also just write your own validation code, winforms is a lot more flexible to start with. There''s a maskededitbox for a start, although I prefer not to use it, it does allow you to validate input.


这篇关于我可以在c#.net中基于窗口的应用程序中使用验证控件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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