会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
↖(^ω^)↗牛牛↖(^ω^)↗
博客园
首页
新随笔
联系
管理
ErrorProvider组件
ErrorProvider实际上并不是一个控件, 而是一个组件. 当把组件拖放到设计器上时, 它会显示在设计器下方的组件栏中.
当存在一个错误条件时, ErrorProvider可以在控件的旁边显示一个图标.
例: 这里errAllInfo是一个ErrorProvider组件.
Code
if
(
this
.txtUid.Text.Length
==
0
)
{
this
.errAllInfo.SetError(
this
.txtUid,
"
用户名不能为空!
"
);
}
if
(
this
.txtPwd.Text.Length
<
6
)
{
this
.errAllInfo.SetError(
this
.txtPwd,
"
密码不能小于6位!
"
);
}
posted @
2009-09-16 18:20
牛小花
阅读(
289
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部