如何在警报框中显示验证控件的错误消息? [英] How to show validation control's Error messages in Alert box?

查看:63
本文介绍了如何在警报框中显示验证控件的错误消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在为4个文本框使用4个必需的字段验证器,4个正则表达式验证器和4个比较验证器.是否可以显示错误消息

验证失败时在警报或消息框中显示吗?

如有可能,请发送代码示例.

问候,

NSJ

Hi All,

I am using 4 required field validators,4 regular expression validators and 4 compare validators for 4 text boxes.Is it possible to show error messages

in an alert or message box when validation fails?

If possible please send code sample.

Regards,

NSJ

推荐答案

使用<a href="http://www.google.com/search?q=using+validations">ValidationSummary</a>[<a href="http://www.google.com/search?q=using+validations" target="_blank" title="New Window">^</a>],并将ShowMessageBox 设置为True.


使用验证摘要控件和设置ShowMessageBox属性= True
Use a validation summary control and set ShowMessageBox property = True


这篇关于如何在警报框中显示验证控件的错误消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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