在页面加载中使用ValidationGroup [英] using ValidationGroup on page load

查看:70
本文介绍了在页面加载中使用ValidationGroup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在页面加载时运行ValidationGroup="RegisterUserValidationGroup"?

因为我有

Is it posible to run the ValidationGroup="RegisterUserValidationGroup" on page load?

because i have

<asp:RequiredFieldValidator ID="RequiredFieldValidatortxtEmailAddress" 

            runat="server" ErrorMessage="*" ControlToValidate="txtEmailAddress" 

            ForeColor="#FF3300" ValidationGroup="RegisterUserValidationGroup">



现在,在Page_load上,错误消息味精应该出现



Now on Page_load the error msg should appear

推荐答案

据我所知,行业标准"是显示带有必填字段的"*". > 控件中是否填充了某些内容不会更改该字段为必填项的事实.

删除"*"的事实可能使用户认为该字段不再是必填字段,因此删除了输入的数据.

我的建议是遵守此标准",并始终在必填字段旁边显示"*".使用验证器给出有关在字段中输入的数据的错误.
As I understand it the "industry standard" is to show a ''*'' with mandatory fields.
Whether something is filled in the control does not change the fact that the field is mandatory.

The fact that the ''*'' is removed might make the user think the field is no longer mandatory and remove the data entered.

My advise would be to adhere to this "standard" and always show the ''*'' next to mandatory fields. Use the validator to give an error about the data entered in the field.


这篇关于在页面加载中使用ValidationGroup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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